#include <stdio.h> int main() { int x; printf("输入一个整数: \n"); scanf("%d",&x); if(x%2==1) printf("是奇数"); else printf("是偶数"); return 0; }
#include <stdio.h> int main() { int days; printf("输入一个整数: \n"); scanf("%d",&days); if(days<=5&&days>=1) printf("workdays, fighting\n"); else if(days==6||days==7) printf("weekend, relax~\n"); else printf("Ooops, not in 1~7\n"); return 0; }
#include <stdio.h> int main() { char ch; printf("输入一个字符:\n"); scanf("%c",&ch); if(ch>=97&&ch<=122) ch=ch-32; printf("%c\n",ch); return ;
}
作为新手很多东西不是很明白,需要多多学习