1039: [编程入门]宏定义之闰年判断 摘要:```cpp #include #define LEAP_YEAR(y) (y%100!=0&&y%4==0||y%400==0)?'L':'N' int main() { int y;…… 题解列表 2022年12月06日 0 点赞 0 评论 1139 浏览 评分:7.0
1038: [编程入门]宏定义练习之三角形面积 ```cpp#include#defineS(a,b,c)(a+b+c)/2#definearea(S,a,b,c)sqrt(S*(S-a)*(S-b)*(S-c))intmain(){doublea,b,c;scanf("%lf%lf%lf", 题解列表 2022年12月06日 0 点赞 0 评论 903 浏览 评分:9.9
1037: [编程入门]宏定义的练习 摘要:```cpp #include #define S(a,b) a%b int main() { int a,b; scanf("%d %d",&a,&b); printf("%d…… 题解列表 2022年12月06日 0 点赞 0 评论 804 浏览 评分:9.9
1036: [编程入门]带参数宏定义练习 摘要:```cpp #include #define change(a,b) t=a,a=b,b=t int main() { int a,b,t; scanf("%d %d",&a,&b…… 题解列表 2022年12月06日 0 点赞 0 评论 592 浏览 评分:6.0
1051: [编程入门]结构体之成绩统计2 ```cpp#includeintn,i,sum1=0,sum2=0,sum3=0,temp=0,cout=0;structstudent{charid[100];charname[100];intscore[3];intTotalscore;}s[100];voidinput(inti){scanf 题解列表 2022年12月06日 0 点赞 0 评论 583 浏览 评分:9.9
约瑟夫环重新写一遍 摘要:解题思路:注意事项:最后li2=[3,6,1,5,2,8,4,7]参考代码:n,m=map(int,input().split())li=[]li2=[]for i in range(1,n+1): …… 题解列表 2022年12月06日 0 点赞 0 评论 530 浏览 评分:0.0
1050: [编程入门]结构体之成绩记录 ```cpp#includestructstudent{charid[100];charname[100];intscore[3];}s;voidinput(){scanf("%s%s%d%d%d",s.id,s.name,&s.score[0], 题解列表 2022年12月06日 0 点赞 0 评论 580 浏览 评分:9.9
一种超简单的方法 摘要:#include int main() { double n,m; scanf("%lf",&n); if(n…… 题解列表 2022年12月06日 0 点赞 0 评论 626 浏览 评分:9.9
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 评论 507 浏览 评分:9.9
纸张尺寸C语言 摘要:解题思路:注意事项:ASCII码的使用。参考代码:#include<stdio.h>#include<stdlib.h>int main(){ int length[10][2]; int…… 题解列表 2022年12月06日 0 点赞 0 评论 725 浏览 评分:0.0