题解列表
人口增长问题的C语言详解
摘要:解题思路:计算n年后的人数,要对人口进行循环加法,所以循环体系用for循环或者while循环。注意事项:注意求n年后的人数,第n年的增量不算在其内。也就是循环n-1次即可。输出保留四位小数,四位用%.……
C语言解决输出绝对值
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){double x;scanf("%lf",&x);if(x<0)printf("%.2f\n",-x);if(x>……
蛇行矩阵(c语言代码)
摘要:参考代码:#include<stdio.h>int main(){ int N,i=1,j=0,c,a,d; int b=2,q; scanf("%d",&N); q=N; while(j<q) { ……
编写题解 1046: [编程入门]自定义函数之数字后移
摘要:解题思路:注意传传递的数据以及输入的个数数组和想要移动的位数注意事项:移动的写法for (j = b - c; j <b;j++)参考代码:#include <stdio.h>int a[10001]……
求[X,Y]内被除3余1并且被除5余3的整数的和(简单C++)
摘要:解题思路:注意事项:参考代码:#include<iostream>
using namespace std;
int main()
{
int x,y,s=0,i;
cin>……
数组的距离(简单嘞C++)
摘要:解题思路:注意事项:参考代码:#include<iostream>
using namespace std;
#include<algorithm>
#include<cmath>
int m……
C++超级简单的基础题解
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int sum = 1; int n; while ……