From 3c0de68177c700425543c4731f9f54f667e0d8ed Mon Sep 17 00:00:00 2001 From: Aadit Agrawal Date: Sat, 31 Aug 2024 09:25:41 +0530 Subject: [PATCH] Update OOP/Java/Lab/Week4/TraceNorm.java --- OOP/Java/Lab/Week4/TraceNorm.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OOP/Java/Lab/Week4/TraceNorm.java b/OOP/Java/Lab/Week4/TraceNorm.java index a403045..15b5ac5 100644 --- a/OOP/Java/Lab/Week4/TraceNorm.java +++ b/OOP/Java/Lab/Week4/TraceNorm.java @@ -13,7 +13,10 @@ class TraceNorm { System.out.println("Enter the elements of the matrix:"); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { - matrix[i][j] = sc.nextDouble(); + System.out.print( + "Enter the element at (" + i + "," + j + "): " + ); + matrix[i][j] = sc.nextInt(); } }