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 return 0; 17 }