摘要:
字符型常量用单引号。 阅读全文
摘要:
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 } 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 <= 阅读全文
摘要:
控制输入输出的格式。 阅读全文
摘要:
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 * 阅读全文
摘要:
参考这个博客,https://blog.csdn.net/sinat_40936062/article/details/84348021 阅读全文
摘要:
从浮点数中分离出整数部分和小数部分。 阅读全文