摘要: //用switch语句实现简单的计算器功能 #include int main() { int a,b,c; char ch; printf("输入a + b 格式\n"); scanf("%d %c %d",&a,&ch,&b); switch(ch) { case '+': c = a + b; break... 阅读全文
posted @ 2017-07-13 15:40 Janskid 阅读(4351) 评论(0) 推荐(0) 编辑
摘要: //输入一个月份,计算这个月份的天数 #include int main() { int year,mon; int leap; int days; printf("输入年份、月份:\n"); scanf("%d %d",&year,&mon); fun(year); switch(mon) { case... 阅读全文
posted @ 2017-07-13 15:38 Janskid 阅读(1147) 评论(0) 推荐(0) 编辑