|
|
вернуться в форумTest #2 What is wrong: #include <stdio.h> #include <string.h> int i,j,k,flag; char last; char a[10001]; int main() { last='.'; while(gets(a)!=NULL) { for (i=0;i<strlen(a);i++) { if (last!='?'&&last!='!'&&last!='.') if (a[i]>='A'&&a[i]<='Z') a[i]+=32; last=a[i]; } for (i=0;i<strlen(a);i++) printf("%c",a[i]); printf("\n"); } return 0;
}
Re: Test #2 HELLO. WORLD Right answer is: Hello. World Your program prints: Hello. world |
|
|