import java.util.Random
public class Test {
public static void main(String[] args) {
int maxVal=-1
int maxRow=-1
int maxCol=-1
int[][] arr=new int[5][5]
for(int i=0i<5i++){
for(int j=0j<5j++){
arr[i][j]=new Random().nextInt(100)
if(maxVal<蚂庆橘arr[i][j]){
maxVal=arr[i][j]
maxRow=i
maxCol=j
}
System.out.print(arr[i][j]+"闷团 "差棚)
}
System.out.println()
}
System.out.println("最大行"+maxRow)
System.out.println("最大列 "+maxCol)
System.out.println("max number is "+maxVal)
}
}
import java.util.Scannerpublic class Test {
public static void main(String[] args) {
int num = 5
int[] n = new int[num]
Scanner sc = new Scanner(System.in)
System.out.println("请输入"+num+"位会员的积分")
for(int i=0i<numi++){
System.out.print("第"+(i+1)+"位会员积分:")
n[i]=sc.nextInt()
}
System.out.println("野悄\n序号\t历史积颂脊肢分")
for(int i=0i<n.lengthi++){
System.out.println(i+1+"\t"野世+n[i])
}
sc.close()
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)