i wrote this question . i got the correct answear but it has not a pass testing . what it should be ??following is the question
Multiplication table
Write a program that displays multiplication table of 10 by 10. Use “while” loop.
Separate numbers by a space.
1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 12 14 16 18 20
...
int i=1,n;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
//System.out.print("Enter the value of n:");
n=Integer.parseInt(br.readLine());
int row,column,y;
//System.out.println("multiplication table");
row=1;
do
{
column=1;
do
{
y=row*column;
System.out.print(" "+y);
column=column+1;
}
while(column<=n);
System.out.println(" ");
row=row+1;
}
while(row<=n);
asked
20 Mar '15, 15:17
Muhammad Has...
43●1●15●25
accept rate:
0%