Изменить 'du1/program.c'
This commit is contained in:
parent
e6bedd5a29
commit
096061440a
@ -1,5 +1,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
int main (){
|
int main (){
|
||||||
char c[100];
|
char c[100];
|
||||||
@ -30,11 +31,11 @@ int main (){
|
|||||||
for(int i = 0; i < 100; i++){
|
for(int i = 0; i < 100; i++){
|
||||||
if(c[i] == '\n') break;
|
if(c[i] == '\n') break;
|
||||||
if(isupper(c[i]))
|
if(isupper(c[i]))
|
||||||
printf(tolower(c[i]));
|
printf("%c", tolower(c[i]));
|
||||||
else if(islower(c[i]))
|
else if(islower(c[i]))
|
||||||
printf(toupper(c[i]));
|
printf("%c", toupper(c[i]));
|
||||||
else
|
else
|
||||||
printf(c[i]);
|
printf("%c", c[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//counter++;
|
//counter++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user