#include <stdio.h>
#include <string.h>
void main(){
int a=0,b=0,i;
char c[300];
printf("Please input a string lessthan300characters:");
gets(c);
for(i=0;i<300,c[i]!='\0';i++){
if(c[i]==' ')
a++;
elseb++;
}
printf("String space characters with%d, non-whitespace character with %d\n",a,b);
}
2020-04-18
最新推荐文章于 2020-06-10 22:33:26 发布