0
3.9kviews
Write a program that queries a user for the number of rows and columns representing students and their marks.

Reads data row by row and displays the data in tabular form along with the row totals, column totals and grand total.

Hint: enter image description here

Marks: 10 M

Year: Dec 2013

1 Answer
2
27views
import java.io.*;
class tabular {
    public static void main(String args[]) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));  
        System.out.println("Enter the number of rows");
        int row = Integer.parseInt(br.readLine());
        System.out.println("Enter the number of columns");
        int col = Integer.parseInt(br.readLine());

        int A[] [] = new int[10][10];
        System.out.println("Enter the numbers below: ");
        for(int r=0; r<row; r++) …

Create a free account to keep reading this post.

and 3 others joined a min ago.

we have an slight error in the output, the last number should be 21 and it's showing 0.


Please log in to add an answer.