利用简单俩for解决 摘要:解题思路:题目要求用6.2f的格式,意思就是用占位符 %6.2f 的形式来输出注意事项:参考代码:#include<stdio.h>int main(){ float n; scanf("%f",&n…… 题解列表 2024年09月11日 0 点赞 0 评论 505 浏览 评分:0.0
使用c语言函数 摘要:解题思路:使用c语言自带的数学函数注意事项:参考代码:#include<stdio.h>#include<math.h>#define compare(a,b,c) d=fmax(a,b),e=fma…… 题解列表 2024年09月11日 1 点赞 0 评论 932 浏览 评分:0.0
[编程入门]电报加密 C语言 摘要:解题思路:gets是不是只能在C语言中使用注意事项:参考代码:#include<stdio.h>#include <string.h>using namespace std;int main(){ …… 题解列表 2024年09月11日 0 点赞 0 评论 665 浏览 评分:0.0
使用C++sort函数 摘要:解题思路:注意sort的头文件是<algorithm>注意事项:参考代码:#include<iostream>#include <algorithm>using namespace std;int m…… 题解列表 2024年09月11日 0 点赞 0 评论 309 浏览 评分:0.0
c语言——直接输出数组 摘要:```c #include #include #define MAX 101 int main() { int n; int num[MAX][MAX], num_…… 题解列表 2024年09月11日 0 点赞 0 评论 224 浏览 评分:0.0
详细注释版(c语言代码) 摘要:```c #include #include #define MAX 101 // 定义矩阵的最大维度为 101 #define max(a,b) if(a…… 题解列表 2024年09月11日 0 点赞 0 评论 247 浏览 评分:0.0
[编程入门]自定义函数之整数处理:看大神才写出来 摘要:参考代码:#include <iostream>using namespace std;int a[10];void shuru(){ for(int i=0;i<10;i++){ …… 题解列表 2024年09月12日 0 点赞 0 评论 256 浏览 评分:0.0
利用动态数组以及建立循环条件 摘要:解题思路:如果是字符串的话或许可以套用循环公式,但题目要求是要整数,在这里我们要明白当(a<b时)a%b=a的,利用这个性质我们就可以为这10个数字设置一个公式,即(a+m)%b,m为要移动的位置,在…… 题解列表 2024年09月12日 0 点赞 0 评论 351 浏览 评分:0.0
输入10个整数,将其中最小的数与第一个数对换,把最大的数与最后一个数对换。 写三个函数; ①输入10个数;②进行处理;③输出10个数。 摘要:解题思路:注意事项:参考代码://输入10个数void scanf_ten(int* pc){ int i = 0; for (i = 0; i < 10; i++) { …… 题解列表 2024年09月12日 0 点赞 0 评论 233 浏览 评分:0.0
借鉴大神的写法:写出自己的理解1047: [编程入门]报数问题 摘要:解题思路:看到大神写的不禁感叹! 我也是借鉴来的 首先我们要把题目搞清楚,将各个对象用C++的语言描述 n个人,首先应该想到 题解列表 2024年09月13日 0 点赞 0 评论 334 浏览 评分:0.0