package com.codegym.task.task03.task0314;
/*
Multiplication table
*/
public class Solution {
public static void main(String[] args) {
//write your code here
String a = " 1 2 3 4 5 6 7 8 9 10" ;
String b = " 2 4 6 8 10 12 14 16 18 20" ;
String c = " 3 6 9 12 15 18 21 24 27 30";
String d = " 4 8 12 16 20 24 28 22 26 40";
String e = " 5 10 15 20 25 30 35 40 45 50";
String f = " 6 12 18 24 30 36 42 48 54 60";
String g = " 7 14 21 28 35 42 49 56 63 70";
String h = " 8 16 24 32 40 48 56 64 72 80";
String i = " 9 18 27 36 45 54 63 72 81 90";
String j = "10 20 30 40 50 60 70 80 90 100";
System.out.println(a);
System.out.println(b);
System.out.println(c);
System.out.println(d);
System.out.println(e);
System.out.println(f);
System.out.println(g);
System.out.println(h);
System.out.println(i);
System.out.println(j);
}
}
What wrong with this code
Resolved
Comments (5)
- Popular
- New
- Old
You must be signed in to leave a comment
Prabin Kunwar
16 October 2019, 18:03
Please read the Conditions carefully before you code.
In line 21, add space in front of 10 ..(" 10 20 30 . . .. )
Any way i did it using for loop.
for (int x = 1; x <= 10; x++){
for (int y =1; y <= 10; y++){
System.out.print(x*y + " ");
}
System.out.println();
}
+1
Thomas Sixberry
20 January 2020, 21:31
We haven't gone over this yet, left to guess (or come back to) and the Conditions are not clear at all. At least for me, the novice.
0
TUSHAR SHUKLA
9 June 2019, 09:33
bddy i realised the amount of hardwork you did,but the way you solved it is so time consuming and can work for small outputs.
0
Dharun Karthi
7 June 2019, 15:47
in line 21, add space in front of 10
+1
Jason
9 June 2019, 01:48
yeah, that might work as well. I was thinking you had to take all the spaces out of the front for each line but I'm not 100% sure how picky the parameters are.
0