#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
if(n==1)
printf("Good morning!");
else if(n==2)
printf("Good afternoon!");
else if(n==3)
printf("Good nnight!");
else
printf("input error!");
return 0;
}
#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
if(n==1)
printf("Good morning!");
else if(n==2)
printf("Good afternoon!");
else if(n==3)
printf("Good nnight!");
else
printf("input error!");
return 0;
}
本文标题:练习2-5-2:根据输入选择输出(多分支结构,简单循环结构)
本文链接:https://www.haomeiwen.com/subject/cpssqrtx.html
网友评论