Untitled
unknown
plain_text
3 years ago
536 B
2
Indexable
#include <stdio.h> #include <string.h> #include <ctype.h> int main(void) { int i,j,k; char input[101]; while(gets(input)) { if(input[0]=='0' && input[1]==' ') { break; } else { i=0; k=0; for(i=0;i<strlen(input);i++) { if(islower(input[i])) { k+=(input[i]-96); } } printf("%d\n",k); } } }
Editor is loading...