else和else if有什么区别谢谢了,大神帮忙啊
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/06/10 12:59:09
else和else if有什么区别谢谢了,大神帮忙啊
#include "stdio.h" void main() { char string[81]; int i,num=0,word=0; char c; gets(string); for(i=0;(c=string[i])!='\0';i++) if(c==' ') word=0; else if(word==0); {word=1; num++;} printf("there are %d words in the line.\n",num); } 程序是计算有几个单词 if(c==' ') word=0; else if(word==0); {word=1; num++;} else和else if有什么区别?还有这段怎么执行的不太明白
#include "stdio.h" void main() { char string[81]; int i,num=0,word=0; char c; gets(string); for(i=0;(c=string[i])!='\0';i++) if(c==' ') word=0; else if(word==0); {word=1; num++;} printf("there are %d words in the line.\n",num); } 程序是计算有几个单词 if(c==' ') word=0; else if(word==0); {word=1; num++;} else和else if有什么区别?还有这段怎么执行的不太明白
If (……)else if(……) 表示:如果……那么……,否则如果……,那么……
多个if语句和else if有什么区别?
请问#if ..#else..#endif和if..else有什么区别?尽量用例子说明一下,
someone else和anyone else有什么区别?
anywhere else somewhere else 有什么区别
everything else 和 anything else有什么区别.首先,anything else可以用于肯定句
if else 和 if if 的区别
other 和 else 有什么区别
C语言中,if,else和#if,#else有什么不同,
用if.else和elseif有什么区别和联系?可以相互替换吗?
everyday和every day有什么区别?anything else和any thing else有什么区分?
C语言中,连续写2个if语句,和用if...else if有什么区别
Lisp 语言中 if和cond有什么区别 如果是两个条件 if和cond else效果一样的?