From 5e9f347b320b1afec27f116acf37135a4eb045ca Mon Sep 17 00:00:00 2001 From: Aadit Agrawal Date: Sat, 31 Aug 2024 09:26:51 +0530 Subject: [PATCH] Update OOP/Java/Lab/Week4/SearchCount.java --- OOP/Java/Lab/Week4/SearchCount.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OOP/Java/Lab/Week4/SearchCount.java b/OOP/Java/Lab/Week4/SearchCount.java index ed29b74..4fb9389 100644 --- a/OOP/Java/Lab/Week4/SearchCount.java +++ b/OOP/Java/Lab/Week4/SearchCount.java @@ -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();