#include<stdio.h>
#include<string.h>
int main()
{
char a[1000];
int i,len;
scanf("%[^.]",a);
len = strlen(a);
for(i = 0;i < len;i++)
{
if(a[i] >= 65&&a[i] <= 90)
a[i] = a[i] + 32;
else if(a[i] >= 97&&a[i] <= 122)
a[i] = a[i] - 32;
}
printf("%s.",a);
return 0;
}
#include<stdio.h>
#include<string.h>
int main()
{
char a[100][100];
int i=0,len;
while(scanf("%s",a[i])!=EOF)
{
i++;
}
for(i--;i >= 0;i--)
printf("%s ",a[i]);
return 0;
}
#include<stdio.h>
int main()
{
int i,j,num1,num2;
char studentid[100][100],studentname[100][100],gender[100][100],
age[100][100],id[100][100];
scanf("%d",&num1);
for(i=0;i<num1;i++)
{
scanf("%s%s%s%s",studentid[i],studentname[i],gender[i],age[i]);
}
scanf("%d",&num2);
for(i=0;i<num2;i++)
{
scanf("%s",id[i]);
}
for(i=0;i<num2;i++)
{
for(j=0;j<num1;j++)
{
if(studentid[j][2] == id[i][2])
{
printf("%s %s %s %s\n",studentid[j],studentname[j],gender[j],age[j]);
break;
}
if(j == (num1-1))
printf("No Answer!\n");
}
}
return 0;
}
#include<stdio.h>
int main()
{
int a[10],b[10],j=0,c[10],k[10],i,max,min,many,num=0,num1=0;
for(i=0;i<10;i++)
{
scanf("%d",&a[i]);
b[i] = a[i];
c[i] = a[i];
}
for(i=0;i<10;i++)
{
if(a[i]>=a[j])
{
max = a[i];
j = i;
}
}
printf("Greatest:%d\n",max);
j = 0;
for(i=0;i<10;i++)
{
if(a[i]<=a[j])
{
min = a[i];
j = i;
}
}
printf("Smallest:%d\n",min);
j = 0;
for(i=0;i<10;i++)
{
num1 = 0;
for(j=0;j<10;j++)
{
if(a[i]==a[j])
num1++;
}
if(num1>num)
{
num = num1;
many = a[i];
}
}
printf("The most occurring item:%d\n",many);
return 0;
}
#include <stdio.h>
#include <string.h>
#define array 100
int main(){
char n[2][array] = {0}, sym[2];
scanf("%s%s%s", n[0], sym, n[1]);
int num[2] = {strlen(n[0]), strlen(n[1])};
char ans[array] = {0};
if(sym[0] == '+'){
for(int i = 0; i < num[0]; i++){
ans[array-num[0]+i] += (n[0][i]-'0');
}
for(int i = 0; i < num[1]; i++){
ans[array-num[1]+i] += (n[1][i]-'0');
}
for(int i = array-1; i > -1; i--){
if(ans[i] >= 10){
ans[i-1] += 1;
ans[i] -= 10;
}
}
}else{
int check = 0;
if(num[0] > num[1]){
check = 1;
}else if(num[0] == num[1]){
check = 1;
for(int i = 0; i < num[0]; i++){
if(n[0][i] < n[1][i]){
check = 0;
break;
}
}
}
if(check){
for(int i = 0; i < num[0]; i++){
ans[array-num[0]+i] += (n[0][i]-'0');
}
for(int i = 0; i < num[1]; i++){
ans[array-num[1]+i] -= (n[1][i]-'0');
}
for(int i = array-1; i > -1; i--){
if(ans[i] < 0){
ans[i-1] -= 1;
ans[i] += 10;
}
}
}else{
for(int i = 0; i < num[1]; i++){
ans[array-num[1]+i] += (n[1][i]-'0');
}
for(int i = 0; i < num[0]; i++){
ans[array-num[0]+i] -= (n[0][i]-'0');
}
for(int i = array-1; i > -1; i--){
if(ans[i] < 0){
ans[i-1] -= 1;
ans[i] += 10;
}
}
for(int i = 0; i < array; i++){
if(ans[i] != 0){
ans[i-1] = '-'-'0';
break;
}
}
}
}
for(int i = 0; i < array; i++){
if(ans[i] != 0){
for(int j = i; j < array; j++){
printf("%c", ans[j]+'0');
}
break;
}
}
}