标签:span cas not std enter printf code amp 最大
#include <stdio.h> int main() { int a,b,c,max; printf("Please enter three integers: "); scanf("%d%d%d",&a,&b,&c); if (a >= b && a >= c) { max = a; }else if (b >= a && b >= c) { max = b; } else { max = c; } printf("The maximum ids %d.", max); return 0; }
switch 述句
switch (整数值) { case 常数整数值: 程式片段; break; default: 程式片段; break; }
如:
#include <stdio.h> int main() { int id; printf("ID: "); scanf("%d",&id); switch (id) { case 2: printf("John\n"); break; case 13: printf("Mary\n"); break; default: printf("Not found\n"); break; } return 0; }
标签:span cas not std enter printf code amp 最大
原文地址:https://www.cnblogs.com/pxxfxxxx/p/10711851.html