没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
#include <stdio.h>
#include <stdlib.h>
void bubbleSort(int list[], int last);
void printFrequency(int array[],int x);
int main()
{
int* array;
int x;
int time = 1;
printf("Please enter the number's range:");
scanf_s("%d", &x);
array = (int*)malloc(x*sizeof(int));
printf("Please enter these numbers,we can get the frequencydiagram of them:\n");
for (int i = 0; i < x; i++)
{
scanf_s("%d", &array[i]);
}//for i
bubbleSort(array, x-1);
printf("Now we get the frequencydiagram like follws:\n");
printFrequency(array, x);
free(array);
return 0;
}
void bubbleSort(int list[], int last)
{
int temp;
for (int current = 0; current < last; current++)
#include <stdlib.h>
void bubbleSort(int list[], int last);
void printFrequency(int array[],int x);
int main()
{
int* array;
int x;
int time = 1;
printf("Please enter the number's range:");
scanf_s("%d", &x);
array = (int*)malloc(x*sizeof(int));
printf("Please enter these numbers,we can get the frequencydiagram of them:\n");
for (int i = 0; i < x; i++)
{
scanf_s("%d", &array[i]);
}//for i
bubbleSort(array, x-1);
printf("Now we get the frequencydiagram like follws:\n");
printFrequency(array, x);
free(array);
return 0;
}
void bubbleSort(int list[], int last)
{
int temp;
for (int current = 0; current < last; current++)
资源评论
jimgreen19957
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功