Pages

Thursday, August 11, 2011

d086. 態度之重要的證明


#include
using namespace std;
#include

int main()
{

string str;
while(cin>>str)
{
int size=0,points=0,allchar=1;
size=str.size();
if(size==1 && str[0]=='0')
{
break;
}
for(int i=0;i {
if(!isalpha(str[i]))
{
allchar=0;
break;
}
char a;
a=str[i];
a=tolower(a);
points += a-'a'+1;
}
if(allchar)
cout< else
cout<<"Fail"< str.clear();

}



return 0;
}

No comments:

Post a Comment