Untitled
Anonymous
plain_text
01/09/2024 10:21 PM
488 B
33
Indexable
int scoremath(string words)
{
int score = 0;
int i;
int len;
for (i = 0, len = strlen(words); i < len; i++)
{
if(isupper(words[i]))
{
score += POINTS[words[i] - 'A'];
}
else if(islower(words[i]))
{
score += POINTS[words[i] - 'a'];
}
}
return score;
}Editor is loading...
Leave a Comment