C语言,绝对值函数 + 冒泡排序即可,非常简单 摘要: #include #include #include int main() { int n; while (scanf("%d", &n) != EOF && n)// …… 题解列表 2022年11月07日 0 点赞 0 评论 678 浏览 评分:9.9
1169: 绝对值排序 ```cpp#include#include#defineINT_MAX2147483647usingnamespacestd;intmain(){intnums[200],nums_len=0,nums_buff[30],num_len=0, 题解列表 2022年11月13日 0 点赞 0 评论 583 浏览 评分:9.9
1169: 绝对值排序(c++) 摘要:```cpp #include using namespace std; //自定义排序规则 bool cmp(int x,int y){ return fabs(x)>fabs(y…… 题解列表 2022年11月15日 0 点赞 0 评论 650 浏览 评分:9.9
LikeWater - 1169: 绝对值排序(终于结束了!!!!平民程序员的倾诉!) #####终于把这些代码敲完了,排序的代码我个人感觉是最折腾人的,案例实在太多,我又没有充钱,导致题目一旦出错我需要自己废大量的时间去排除错误,说实话这是一个很掉头发的过程,也十分的折磨人,要不是我心智坚定,恐怕早就copy来copy去了,但即使如此我还是坚持写完了这几个难写的排序题, 题解列表 2023年02月28日 0 点赞 1 评论 825 浏览 评分:9.9
绝对值排序!!!一看就懂 解题思路:1.首先输入要输入的行数(遇到0结束)我们与n相与,当n=0时,跳出循环。2.我们把我们要写入的数据放入我们定义的的数组里面,然后对数组进行排序。注意事项:注意换行参考代码:#include#includeintmain(){intn;while(scanf("%d", 题解列表 2023年05月05日 0 点赞 0 评论 532 浏览 评分:9.9
c语言绝对值排序 #MarkDown编辑器基本使用说明**如果这是您第一次使用MarkDown编辑器,建议先阅读这篇文章了解一下Markdown的基本使用方法。**##实时预览、全屏显示**编辑器左边是输入框, 题解列表 2023年05月07日 0 点赞 0 评论 721 浏览 评分:9.9
C++ 绝对值排序(思路清晰) 摘要: #include #include using namespace std; int main() { int n; while(cin >> n && n != 0…… 题解列表 2023年10月10日 0 点赞 0 评论 650 浏览 评分:9.9
1169: 绝对值排序 摘要:解题思路:一个数若为负数,则这个数的绝对值等于它的相反数;若为非负数,则为它本身; 我们可以定义两个数组sum和sum2,sum用来存放原数,sum2存放绝对值; …… 题解列表 2023年10月14日 0 点赞 0 评论 533 浏览 评分:9.9
1169: 绝对值排序(改编一下sort函数,超方便) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;bool cmp(int a,int b);int ma…… 题解列表 2024年03月13日 0 点赞 0 评论 512 浏览 评分:9.9
绝对值排序(动态内存分配(calloc) 摘要:解题思路:注意事项:参考代码#include<stdio.h>#include<stdlib.h>int main(){ int i,j,n,*p,*t; scanf("%d",&n); while(…… 题解列表 2024年03月30日 0 点赞 0 评论 597 浏览 评分:9.9