- 博客(3)
- 收藏
- 关注
原创 利用二维数组求矩阵的最大值和最小值,并求出其位置
Problem Description 输入一个二维数组,在二维数组中找出最大值和最小值,并指出其位置。 Input 输入一个二维数组 Output 输出最大值和最小值,和对应的位置。 Sample Input 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Sample Output min=1,a[0][0] max=16,a[4][4] 代码如下: #include<stdio.h> #include<stdlib.h&.
2021-12-23 23:13:13
3983
原创 定义一个数组,倒序输出
Problem Description 只定义一个数组,倒序输出 Input 输入一个数组 Output 倒序输出 Sample Input 1 2 3 4 5 6 7 8 Sample Output 8 7 6 5 4 3 2 1 #include<stdio.h> #include<stdlib.h> int main() { int n,i; scanf("%d\n",&n);//数组中元素个数 int a[n];//定义数组 fo.
2021-12-13 23:14:37
1198
1
原创 二维数组,输入随机数,进行每行从小到大排序
#include<stdio.h> #include<math.h> #include<time.h> #define H 9 #define L 8 int main() { int i,j,t,s; int a[H][L]; for(i=0;i<H;i++) { for(j=0;j<L;j++) { a[i][j]=rand( )%1000; p...
2021-11-25 17:04:48
623
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人