0% found this document useful (0 votes)
43 views

Exercise Multiplication

This document is an exercise from a student named Rodjean A. Simballa enrolled in the Bachelor of Science in Information Technology program at Eastern Samar State University College of Computer Studies. The exercise involves writing a Java program to generate a multiplication table with user-defined number of rows and columns and outputting the results in a tabular format.

Uploaded by

Rodjean Simballa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Exercise Multiplication

This document is an exercise from a student named Rodjean A. Simballa enrolled in the Bachelor of Science in Information Technology program at Eastern Samar State University College of Computer Studies. The exercise involves writing a Java program to generate a multiplication table with user-defined number of rows and columns and outputting the results in a tabular format.

Uploaded by

Rodjean Simballa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

EASTERN SAMAR STATE SAMAR

COLLEGE OF COMPUTER STUDIES


BACHELOR OF SCIENCE INFORMATION TECHNOLOGY

Exercise No: 03
Title:Multiplication Table
Name: Simballa , Rodjean A. Course & Section: BSIT -1D Date:____________ Rating:__________

Source Code:
import java.util.scanner;
class Multiplication Table{
public static void main(String[]args){
Scanner sc=new Scanner(System.in);

int rows,cols;

System.out.print(“Enter Multiplication Table rows: “);


rows=sc.nextInt();
System.out.print(“Enter Multiplication Table columns: ”);
cols=sc.nextInt();

System.out.println(“\n Multiplication Table Columns: “);

int[][]MularrayTable = new int[rows][cols];


for(int i=1; i<=rows; i++){
for(int j=1; j<=cols; j++){
MularrayTable[i-1][j-1] = i*j;
}}
for(int i=0; i<rows; i++){
System.out.println(“”);
for(int j=0; j<cols; j++){
System.out.print(MularrayTable[i][j]+”\t”);
}}}}

Output:

You might also like