Aim:- Write a program to print table of 1 to 10 in tabular form.
Software used:- Notepad, Command prompt
Program coding:-
public class multable
{
public static void main(String[] args)
{
int i,j;
for(i=1;i<=10;i++)
{
for(j=1;j<=10;j++)
System.out.print(i*j +" ");
System.out.println("\n\n");
}
}
}
Output:-
Aim:- Write a program to print number from 1 to 100 in tabular form.
Software used:- Notepad, Command prompt
Program coding:-
public class table
{
public static void main(String[] args)
{
int i,j;
for(i=0;i<=9;i++)
{
for(j=1;j<=100;j+=10)
System.out.print( i+j +" ");
System.out.println("\n\n");
}
}
}


0 Comments
if you have any problem, please let me know