[编程入门]结构体之时间设计(水题,超级笨蛋的方法) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>struct time{ int year,month,day;};int main(){ struct time t; int da…… 题解列表 2023年01月08日 0 点赞 0 评论 378 浏览 评分:9.9
[编程入门]结构体之时间设计--傻瓜式写法(c语言) 摘要:解题思路:注意事项:参考代码:#include <stdio.h> struct date{ int year; int month; int day; }; in…… 题解列表 2023年01月01日 0 点赞 0 评论 494 浏览 评分:9.9
思路清晰 switch+if 就OK了 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ struct time { int year; int mon; in…… 题解列表 2022年12月27日 0 点赞 0 评论 460 浏览 评分:0.0
1049: [编程入门]结构体之时间设计 ```cpp#includeintmonth[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},i,sum=0;structtime{intyear;intm;intday;}t;intmain(){scanf("%d%d%d", 题解列表 2022年12月06日 0 点赞 0 评论 506 浏览 评分:9.9
结构体与时间设计C语言 摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct Date{ int year; int mouth; int day;}data;int main(){ int i=0;…… 题解列表 2022年12月06日 0 点赞 0 评论 487 浏览 评分:0.0
C语言 结构体之时间设计& 摘要:解题思路:注意事项:参考代码:#include <stdio.h>struct calendar{ int year; int month; int day;}date, * p;…… 题解列表 2022年11月30日 0 点赞 0 评论 498 浏览 评分:9.9
结构体之时间设计 解题思路:注意事项:参考代码:y,m,d=map(int,input().split())m1=[1,3,5,7,8,10,12]m2=[4,6,9,11]s=0foriinrange(1,m):ifiinm1:s+=31elifiinm2:s+=30else:s+=28s+=dify%4==0and 题解列表 2022年10月29日 0 点赞 1 评论 547 浏览 评分:9.9
1049 结构体之时间设计 真的是C并且真的用了结构体 #思路设计一个结构体date,内含int类型的变量三个:`year,mouth,day`。定义一个结构体变量date1,**为其中的三个变量(`date1.year,date1.mouth,date1.day`)赋值。**用且只用一个`switch`语句完成计算天数和判断闰年的操作, 题解列表 2022年10月25日 0 点赞 0 评论 467 浏览 评分:9.0
结构体之时间设计 #include#include#include#includeusingnamespacestd;structdemo{intyear;intmonth;intday;};intmain(){structdemodate={0};inty=date.year;intm=date.month;intd 题解列表 2022年10月12日 0 点赞 0 评论 437 浏览 评分:0.0
1049-结构体之时间设计 摘要:解题思路:注意事项:参考代码:/*天数问题:1、3、5、7、8、10、12月:31天4、6、9、11月:30天2月:非闰年有28天,闰年有29天 闰年特点:1) 4的倍数,不是100的倍数2) 400…… 题解列表 2022年10月06日 0 点赞 0 评论 470 浏览 评分:0.0