自定义函数之字符串反转 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void dx_print(char a[],int n){ int i=0; for(i=n-1;i>=0;i--) …… 题解列表 2023年11月30日 0 点赞 0 评论 140 浏览 评分:0.0
2846: 统计数字字符个数 摘要:解题思路:这道题涉及了字符串,我们就需要头文件<string.h>,按照题目要求,输入字符会包含空格,所以我们输入不再使用scanf,而是使用gets()。注意事项:在遍历数组中的字符串是,我们要明白…… 题解列表 2023年11月30日 0 点赞 0 评论 575 浏览 评分:6.0
]字符串分类统计 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char a[200]; gets(a); int i,zimu=0,shuzi=0,kong…… 题解列表 2023年11月30日 0 点赞 0 评论 152 浏览 评分:0.0
2937 短信收费 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,m,t=0; int a[1005]; int b[1005]; scanf("%d",&n); f…… 题解列表 2023年11月30日 0 点赞 0 评论 218 浏览 评分:0.0
求平方差个数(超时可参考) 摘要:`解题方法:多列几组关于平方的等式,然后观察规律 ` `例如: 1=1²-0² 5=3²-2² 2 6 3=2²-1² 7=…… 题解列表 2023年11月30日 0 点赞 0 评论 350 浏览 评分:2.0
自由下落的距离运算——易懂 摘要:解题思路:第一步:输入变量m,n,h和s,(m为初始高度,n为落地次数,h为第n次反弹高度,s为总路程)并输入数值分别为m,n赋值。首先:初始高度为m,不进入循环内,将其赋值s。其次:循环内部,从第一…… 题解列表 2023年11月30日 0 点赞 0 评论 214 浏览 评分:9.9
注意PI应该多往后去小数点哦 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#define PI 3.14159int main(){ double r; scanf("%lf",&r); p…… 题解列表 2023年11月30日 0 点赞 0 评论 499 浏览 评分:9.9
C语言训练-求1+2!+3!+...+N!的和 摘要:解题思路:输入一个数N,作为循环步数;先写出每一个数的阶乘的循环体;在加上一个求和即可;注意事项:因为N<=20,所以int的值是不够的,要用long参考代码:#include<stdio.h>lon…… 题解列表 2023年11月30日 0 点赞 0 评论 286 浏览 评分:9.9
非常简单的斐波那契数列 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n=1; int a=1; int b=1; int c=0; scanf("%d",&n); prin…… 题解列表 2023年11月30日 0 点赞 0 评论 173 浏览 评分:9.9
3077: 信息学奥赛一本通T1332-周末舞会 摘要:解题思路:自己想注意事项:无参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c; cin>>a>>b…… 题解列表 2023年11月30日 0 点赞 0 评论 272 浏览 评分:9.9