|  | 
|  | 
| back to board | Test #2 Posted by enick  2 Mar 2008 12:23What 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 Posted by ddRoot  2 Mar 2008 15:29Re: Test #2 Posted by ddRoot  2 Mar 2008 15:31HELLO. WORLDRight answer is:
 Hello. World
 Your program prints:
 Hello. world
Re: Test #2 Posted by enick  4 Mar 2008 20:26Thank you | 
 | 
|