forked from dharmanshu1921/Java
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrintSum.java
More file actions
Latest commit
26 lines (23 loc) · 674 Bytes
/
Copy pathPrintSum.java
File metadata and controls
26 lines (23 loc) · 674 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
packagecom.packages;
importjava.util.*;
publicclassPrintSum {
publicstaticvoidmain(String[] args) {
Scannersc = newScanner(System.in);
introws= sc.nextInt();
intcol = sc.nextInt();
int[][] numbers = newint[rows][col];
intx = sc.nextInt();
for(inti=0;i<rows;i++){
for(intj=0;j<col;j++){
numbers[i][j]= sc.nextInt();
}
}
for(inti=0;i<rows;i++){
for(intj= 0;j<col;j++){
if(numbers[i][j]==x){
System.out.println( i+ " "+j+" ");
}
}
}
}
}