正在加载图片...
#include<stdio.h>3.1.1程序解析int main(void)(intmynumber=38Inputyour number:48int yournumber;Sorry!your numberisbiggerthan my number!printf("Input your number: ");Input your number:38scanf("%d", &yournumber);Ok! you are right!if(yournumber == mynumber)多层缩进的书写格式printf("Ok!you are right!n");else使程序层次分明if(yournumber > mynumber)printf("Sorry! your number is bigger than my number!ln");elseprintf("Sorry! your number is smaller than my number!ln");return 0;i# int include main(void) <stdio.h> 3.1.1 程序解析 { int mynumber = 38; int yournumber; printf("Input your number: "); scanf("%d", &yournumber); if(yournumber == mynumber) printf("Ok! you are right!\n"); else if(yournumber > mynumber ) printf("Sorry! your number is bigger than my number!\n"); else printf("Sorry! your number is smaller than my number!\n"); return 0; } Input your number:48 Sorry! your number is bigger than my number! 多层缩进的书写格式 使程序层次分明 Input your number:38 Ok! you are right!
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有