1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include <stdio.h>
#include <string.h>
#pragma warning (disable:4996)
int main()
{
char string[100] = { '\0', };
char output[100] = { '\0', };
int count = 0;
scanf("%s", string);
for (int i = 0; i < strlen(string); i++)
{
if (('A' <= string[i]) && (string[i] <= 'Z')) {
output[count] = string[i];
count++;
}
else if (('a' <= string[i]) && (string[i] <= 'z')) {
output[count] = string[i] - ('a' - 'A');
count++;
}
}
printf("%s", output);
return 0;
}
|
cs |