Daffodil International University
Problem Link
//Please follow from main function#include<stdio.h>
#include<string.h>
int main()
{
int i, len, j, t, cou=0, n;
char line[1000];
//scanf("%d", &t)
while(1){
j=1;
// getchar();
gets(line);
len=strlen(line);
for(i=0; i<len; i++){
if((line[i]<'A') || (line[i]>'Z' && line[i]<'a') || line[i]>'z'){
cou++;
if(cou>1){
j++;
cou=0;
}
}
}
printf("%d\n", j);
}
return 0;
}
0 Comments