赞
踩
一、N-S流程图;
二、运行结果;
三、源代码;
- # define _CRT_SECURE_NO_WARNINGS
- # include <stdio.h>
-
- int main()
- {
- //初始化变量值;
- int i, j, max = 0, row = 0, colum = 0;
- int arr[3][4] = { {1, 2, 3}, {4, 5, 16}, {7, 8, 9} };
-
- //循环判断;
- for (i = 0; i < 3; i++)
- {
- //列;
- for (j = 0; j < 4; j++)
- {
- //判断;
- if (arr[i][j] > max)
- {
- //转换;
- max = arr[i][j];
- row = i;
- colum = j;
- }
- }
- }
-
- //输出;
- printf("最大值为:%d,为第%d行,第%d列\n", max, row, colum);
-
- return 0;
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。