求第4、5小题的答案和过程!
答案:2 悬赏:80 手机版
解决时间 2021-03-08 14:11
- 提问者网友:兔牙战士
- 2021-03-07 14:33
求第4、5小题的答案和过程!
最佳答案
- 五星知识达人网友:白昼之月
- 2021-03-07 15:03
main()
{
int year, month, day, i, days[11], which_day;
days = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30};
scanf("%d %d %d", &year, &month, &day);
which_day = 0;
for(i = 0; i < month - 1; i++) {
which_day += days[i];
}
if((year % 400 == 0 || (year % 4 == 0 && year % 100 != 0)) & month > 2) {
which_day++;
}
which_day += day;
printf ("the answer is %d\n", which_day);
}
main() {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if( a < 0 || b < 0 || c < 0 ) exit();
if( a + b > c || a+c > b || b + c > a) exit();
if( a == b) {
if (a == c) printf("a=b=c\n");
else printf ("a = b\n");
} else {
if (a == c || b == c) printf ("...\n");
else printf("...\n");
}
}
{
int year, month, day, i, days[11], which_day;
days = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30};
scanf("%d %d %d", &year, &month, &day);
which_day = 0;
for(i = 0; i < month - 1; i++) {
which_day += days[i];
}
if((year % 400 == 0 || (year % 4 == 0 && year % 100 != 0)) & month > 2) {
which_day++;
}
which_day += day;
printf ("the answer is %d\n", which_day);
}
main() {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if( a < 0 || b < 0 || c < 0 ) exit();
if( a + b > c || a+c > b || b + c > a) exit();
if( a == b) {
if (a == c) printf("a=b=c\n");
else printf ("a = b\n");
} else {
if (a == c || b == c) printf ("...\n");
else printf("...\n");
}
}
全部回答
- 1楼网友:持酒劝斜阳
- 2021-03-07 15:39
第一个是分部积分法,第二个是三角代换
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯