Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Abhay
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { Scanner sc=new Scanner(System.in); System.out.println("enter the value of n"); int r=sc.nextInt(); int arr[][]=new int[r][r]; int i,j,s=0,h=0; System.out.println("enter the numbers"); for(i=0; i<r; i++) { for(j=0; j<r; j++) { arr[i][j]=sc.nextInt(); } } for(i=0; i<r; i++) { for( j=0; j<r; j++) { System.out.print(arr[j][i]+" "); } System.out.println(); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
AllStar
Two Sum in Sorted input array
To check whether a given number is smith number or not
dfkbzhfvjahfjh
Kochergina
Coding For Fandroid
ekse
2(B)
kth smallest element
test1
Please log in to post a comment.