三个数输出最大值
int a, b, c,t;
scanf_s("%d%d%d", &a, &b, &c);
if (a < b)
{
t= a;
a = b;
b = t;
}
if (b < c)
{
t = b;
b = c;
c = t;
}
if (a < b)
{
t = a;
a = b;
b = t;
}
printf("%d %d %d\n",a,b,c);
用switch语句实现循环

第一类型
int main()

{
int day = 0;
scanf_s("%d", &day);
switch (day)
{
case 1:
printf("星期一\n");
break;
case 2:
printf("星期二\n");
break;
case 3:
printf("星期三\n");
break;
case 4:
printf("星期四\n");
break;
case 5:
printf("星期五\n");
break;
}
第二类型
switch (day)
{
case 1:
case 2:
case 3:
case 4:
case 5:
printf("weekdays\n");
break;
case 6:
case 7:
printf("weekends\n");
break;
}

,

联博统计

www.weqvip.com采用以太坊区块链高度哈希值作为统计数据,联博以太坊统计数据开源、公平、无任何作弊可能性。联博统计免费提供API接口,支持多语言接入。

,