编写题解 1013: [编程入门]Sn的公式求和 摘要:解题思路:注意事项:参考代码:a=int(input())sn=s=0i=1while i<=a: s=s+2*(10**(i-1)) sn=sn+s i+=1print(sn)…… 题解列表 2022年06月15日 0 点赞 0 评论 485 浏览 评分:0.0
[编程入门]宏定义之闰年判断 摘要:解题思路:解决此问题需要知道闰年有什么特点,普通闰年的特点是能够被四百整除,所以此处定义的宏所表示的字符串写作y%400==0,如果此条件为真,则打印输出L;否则打印输出N。参考代码:#include…… 题解列表 2022年06月15日 0 点赞 0 评论 295 浏览 评分:6.0
1046: [编程入门]自定义函数之数字后移 摘要:解题思路:注意事项:参考代码:#includevoid chag(int n,int m,int num[]){ int lis[n],i; for(i=0;i<m;i++){ …… 题解列表 2022年06月15日 0 点赞 0 评论 241 浏览 评分:0.0
1045: [编程入门]自定义函数之整数处理(C语言指针函数) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> void swap(int num[]){ int *max=&num[0],*min=&num[0],ma,mi; …… 题解列表 2022年06月15日 0 点赞 0 评论 230 浏览 评分:0.0
编写题解 1012: [编程入门]字符串分类统计 摘要:解题思路:注意事项:参考代码:str1=input()mu,number,kong,n=0,0,0,0list=["0","1","2","3","4","5","6","7","8","9"]for…… 题解列表 2022年06月14日 0 点赞 0 评论 581 浏览 评分:0.0
1045: [编程入门]自定义函数之整数处理 摘要:解题思路:注意事项:参考代码:#include<stdio.h> void chan(int lis[]){ int max=0,ma=0,min=0,mi=0; for(int…… 题解列表 2022年06月14日 0 点赞 0 评论 266 浏览 评分:0.0
1044: [编程入门]三个字符串的排序 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<string.h> #include<ctype.h> int main() { char str…… 题解列表 2022年06月14日 0 点赞 0 评论 305 浏览 评分:0.0
编写题解 1006: [编程入门]三个数找最大值 摘要:解题思路:注意事项:参考代码:a,b,c=map(int,input().split())max=aif max<b: max=b if max<c: max=celse: …… 题解列表 2022年06月14日 0 点赞 0 评论 488 浏览 评分:0.0
编程入门]宏定义练习之三角形面积 摘要:解题思路:根据题目给出的数学公式,定义两个带参的宏,一个S表示(a+b+c)/2,另一个AREA表示sqrt(S*(S-a)*(S-b)*(S-c))。在主函数中可以直用printf("%.3f",A…… 题解列表 2022年06月14日 0 点赞 2 评论 395 浏览 评分:7.0
1043: [编程入门]三个数字的排序 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a>b){ …… 题解列表 2022年06月14日 0 点赞 0 评论 241 浏览 评分:0.0