摘要: 字符型常量用单引号。 阅读全文
posted @ 2019-11-01 16:42 jason2018 阅读(448) 评论(0) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 3 int main(void) 4 { 5 int num; 6 7 scanf_s("%d", &num); 8 9 printf("%d", num / 16 * 10 + num % 16); 10 11 12 return 0; 13 } 阅读全文
posted @ 2019-11-01 16:15 jason2018 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 3 int main(void) 4 { 5 int start; 6 int time; 7 8 scanf_s("%d %d", &start, &time); 9 10 int start_minute = start / 100 * 60 + start % 100; 11 int end_minute = start_minute + time 阅读全文
posted @ 2019-11-01 15:24 jason2018 阅读(716) 评论(0) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 3 int main(void) 4 { 5 int day, next; 6 7 scanf_s("%d", &day); 8 9 next = day + 2; 10 if (next > 7) //超过了7,就是下周了 11 { 12 next = next - 7; 13 } 14 printf("%d\n", next); 15 16 retu 阅读全文
posted @ 2019-11-01 15:08 jason2018 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 3 int main(void) 4 { 5 /* 6 true 1 7 false 0 8 */ 9 10 printf("%d\n", 5 == 3); 11 printf("%d\n", 5 > 3); 12 printf("%d\n", 5 <= 阅读全文
posted @ 2019-11-01 14:12 jason2018 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 控制输入输出的格式。 阅读全文
posted @ 2019-11-01 12:14 jason2018 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 3 int main(void) 4 { 5 int a = 0; 6 int b = 0; 7 8 scanf_s("%d %d", &a, &b); 9 10 printf("%d + %d = %d\n", a, b, a + b); 11 printf("%d - %d = %d\n", a, b, a - b); 12 printf("%d * 阅读全文
posted @ 2019-11-01 10:59 jason2018 阅读(793) 评论(0) 推荐(0) 编辑
摘要: 参考这个博客,https://blog.csdn.net/sinat_40936062/article/details/84348021 阅读全文
posted @ 2019-11-01 10:07 jason2018 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 从浮点数中分离出整数部分和小数部分。 阅读全文
posted @ 2019-11-01 09:52 jason2018 阅读(809) 评论(0) 推荐(0) 编辑