pvjc22/du1/program.c

21 lines
326 B
C
Raw Normal View History

2022-02-20 12:20:20 +00:00
#include <stdio.h>
int main(){
int c = 1;
2022-02-20 12:26:50 +00:00
char small[] = "abcdefghijklmnopqrstuvwxyz";
char big[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
2022-02-20 12:20:20 +00:00
while(c = 1){
c = getchar();
2022-02-20 12:26:50 +00:00
for(int i = 0; i < 26; i++){
if(c == small[i]){
c = big[i];
break;
}else if(c == big[i]){
c = small[i];
break;
}
}
2022-02-20 12:20:20 +00:00
}
return 0;
}