| 
 | 
back to boardWA on Test#8! Please tell me why this program give WA on test8, thanks! #include <iostream> using namespace std; void main() {     int sum=0;     char s[1000];     first:     while(cin.getline(s,1000))     {         for(int i=0;i<strlen(s);i++)         {             switch(s[i])             {                 case'a':case'd':case'g':case'j':case'm':case'p':case's':case'v':case'y':case'.':case' ':                     sum+=1;                     break;                 case'b':case'e':case'h':case'k':case'n':case'q':case't':case'w':case'z':case',':                     sum+=2;                     break;                 case'c':case'f':case'i':case'l':case'o':case'r':case'u':case'x':case'!':                     sum+=3;                     break;             }         }     }     cout<<sum; } Re: WA on Test#8! Posted by  cena 30 Nov 2012 14:25 dude,that's my problem too,plz tell me if you got the solution. thanx==>cena  |  
  | 
|