Enjoy Markdown!
作者:互联网
有一个神奇的语言,比HTML简单,它巧妙地将内容与格式结合在一起,它就是Markdown!
/七个人玩报数游戏 ,8从第一个人开始报
请问输入一个正整数n是由第几个人报出的? /
include <stdio.h>
int main()
{
int n,result;
printf("please input n:");
scanf("%d",&n);
result=n%7;
switch(result)
{
case 0:printf("\nNo.7");break;
case 1:printf("\nNo.1");break;
case 2:printf("\nNo.2");break;
case 3:printf("\nNo.3");break;
case 4:printf("\nNo.4");break;
case 5:printf("\nNo.5");break;
case 6:printf("\nNo.6");break;
}
printf("\nresult=%d\n",result);
return 0;
}
标签:Enjoy,case,Markdown,int,break,result,printf 来源: https://www.cnblogs.com/zj-0408/p/10457831.html