实验4.3

#include<stdio.h>
int main(){
char string[99];
int i,word=0,num=0;
 gets(string);
for(i=0;(string[i])!='\0';i++)
 if(string[i]==' ')
word=0;
else if(word==0)
{
 word=1;
 num++;
}
 printf("¹²ÓÐ%d¸öµ¥´Ê",num);
 return 0;
}

猜你喜欢

转载自www.cnblogs.com/P201821430028/p/10912109.html
4.3