[编程入门]Sn的公式求和 解题思路:本题的关键是如何输出2、22、222、2222。认真思考后我们可以得出以下规律:2=0*10+222=2*10+2222=22*10+22222=222*10+2然后只看等号右面可以得到通式:a*10+2(a初始为0)然后a=a*10+2;Sn+=a;就可以啦注意事项:参考代码:#inclu 题解列表 2021年09月08日 0 点赞 0 评论 606 浏览 评分:0.0
[编程入门]求和训练 摘要:解题思路:注意事项:有疑问,请留言参考代码:#include<stdio.h> int main() { float a,b,c,i,A=0,B=0,C=0; scanf("%f %f %…… 题解列表 2021年09月08日 0 点赞 0 评论 540 浏览 评分:0.0
二级C语言-求偶数和 摘要:解题思路:注意事项:参考代码:int n,i; scanf("%d",&n); int a[n],m=0; for(i=0;i<n;i++) { scanf("%d",&…… 题解列表 2021年09月09日 0 点赞 0 评论 885 浏览 评分:0.0
[编程入门]结构体之时间设计-题解(C语言) 摘要:```c #include int runyear(int year) { if(year%400==0||(year%4==0&&year%100!=0)) return 1; …… 题解列表 2021年09月09日 0 点赞 0 评论 562 浏览 评分:0.0
[编程入门]结构体之成绩记录-题解(C语言) ```c#includestructa{charb[20];charc[20];intd;inte;intf;};structastudent[100];voidinput(inti){scanf("%s%s%d%d%d",&student[i].b, 题解列表 2021年09月09日 0 点赞 0 评论 641 浏览 评分:0.0
[编程入门]结构体之成绩统计2-题解(C语言) ```c#includeintave1=0,ave2=0,ave3=0;structa{charb[20];charc[20];intd;inte;intf;intsum;}student[100],temp;voidinput(inti){scanf("%s%s%d%d%d", 题解列表 2021年09月10日 0 点赞 0 评论 567 浏览 评分:0.0
[编程入门]链表合并-题解(C语言) ```c#includeintave1=0,ave2=0,ave3=0;structa{intb;intc;}student[100],temp;voidinput(inti){scanf("%d%d",&student[i].b,&student[i].c);}voidoutput(inti){pr 题解列表 2021年09月10日 0 点赞 0 评论 568 浏览 评分:0.0
题解 1093: 字符逆序 使用指针解决 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char str[100]={0}; gets(str); …… 题解列表 2021年09月10日 0 点赞 0 评论 620 浏览 评分:0.0
编写题解 1051: [编程入门]结构体之成绩统计2 (C++ 代码) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; struct student { char no[50]; …… 题解列表 2021年09月10日 0 点赞 0 评论 592 浏览 评分:0.0