C语言if语句学习,判断年龄并且提示语句!
来源:互联网 发布:u盘安装mac os x lion 编辑:程序博客网 时间:2024/05/01 08:49
#include <stdio.h>int main(){const int MINOR = 35;int age = 0;printf("请输入你的年龄:"); scanf("%d",&age);if(age <= MINOR){printf("年轻就是努力的资本!加油吧骚年!\n"); }printf("你的年龄是%d岁,年龄决定了你的精神世界,好好珍惜吧!",age); return 0;}
阅读全文