题解列表
利用简单俩for解决
摘要:解题思路:题目要求用6.2f的格式,意思就是用占位符 %6.2f 的形式来输出注意事项:参考代码:#include<stdio.h>int main(){ float n; scanf("%f",&n……
[编程入门]电报加密 C语言
摘要:解题思路:gets是不是只能在C语言中使用注意事项:参考代码:#include<stdio.h>#include <string.h>using namespace std;int main(){ ……
使用C++sort函数
摘要:解题思路:注意sort的头文件是<algorithm>注意事项:参考代码:#include<iostream>#include <algorithm>using namespace std;int m……
c语言——直接输出数组
摘要:```c
#include
#include
#define MAX 101
int main() {
int n;
int num[MAX][MAX], num_……
详细注释版(c语言代码)
摘要:```c
#include
#include
#define MAX 101 // 定义矩阵的最大维度为 101
#define max(a,b) if(a……
[编程入门]自定义函数之整数处理:看大神才写出来
摘要:参考代码:#include <iostream>using namespace std;int a[10];void shuru(){ for(int i=0;i<10;i++){ ……
利用动态数组以及建立循环条件
摘要:解题思路:如果是字符串的话或许可以套用循环公式,但题目要求是要整数,在这里我们要明白当(a<b时)a%b=a的,利用这个性质我们就可以为这10个数字设置一个公式,即(a+m)%b,m为要移动的位置,在……
输入10个整数,将其中最小的数与第一个数对换,把最大的数与最后一个数对换。 写三个函数; ①输入10个数;②进行处理;③输出10个数。
摘要:解题思路:注意事项:参考代码://输入10个数void scanf_ten(int* pc){ int i = 0; for (i = 0; i < 10; i++) { ……