Update OOP/Java/Lab/Week4/SearchCount.java

This commit is contained in:
Aadit Agrawal 2024-08-31 09:26:51 +05:30
parent 1903c1a586
commit 5e9f347b32

View File

@ -11,11 +11,12 @@ class SearchCount {
int n = sc.nextInt();
int[][] matrix = new int[m][n];
System.out.println("Enter the elements of the matrix:");
int count = 0;
System.out.println("Enter the element to search for:");
int searchElement = sc.nextInt();
System.out.println("Enter the elements of the matrix:");
int count = 0;
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
int element = sc.nextInt();