利用随机函数产生36个10~30之间的整数给一个6*6的矩阵赋值.

利用随机函数产生36个10~30之间的整数给一个6*6的矩阵赋值.
1求最大元素值,指出其在矩阵中的所有出现位置;
2求该矩阵的转置矩阵.
要用java程序写的、、
public class text {
public static void main(String arg[]){
int a[][]=new int[6][6];
int s=0;
for(int i=0;i
刘语NJHK 1年前 已收到1个回答 举报

非懂勿言 幼苗

共回答了14个问题采纳率:100% 举报

Java源程序:
import java.util.Random;
public class Test21 {
x05public static void main(String[] args) {
x05x05int[][] a = new int[6][6];
x05x05int[][] b = new int[6][6];
x05x05int i,j,maxI = 0,maxJ = 0;
x05x05int max;
x05x05
x05x05Random rand = new Random();
x05x05for(i=0; i

1年前

2
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 17 q. 0.766 s. - webmaster@yulucn.com