0

Can anybody plz give a task based on loops topic?

https://code.sololearn.com/cjK7H0H38xy2/?ref=app

21st Sep 2018, 6:18 PM
srinu rocky
srinu rocky - avatar
10 Antworten
+ 1
maybe ? print the multiplication table Outputs 01 02 03 04 05 06 07 08 09 10 02 04 06 08 10 12 14 16 18 20 03 06 09 12 15 18 21 24 27 30 04 08 12 16 20 24 28 32 36 40 05 10 15 20 25 30 35 40 45 50 06 12 18 24 30 36 42 48 54 60 07 14 21 28 35 42 49 56 63 70 08 16 24 32 40 48 56 64 72 80 09 18 27 36 45 54 63 72 81 90 10 20 30 40 50 60 70 80 90 100 https://en.m.wikipedia.org/wiki/Multiplication_table
21st Sep 2018, 6:36 PM
Daniel (kabura)
Daniel (kabura) - avatar
+ 1
the program does not print anything, try using two loops to multiply numbers
22nd Sep 2018, 5:18 AM
Daniel (kabura)
Daniel (kabura) - avatar
+ 1
no, you have multiplied each number by 2. you have to do multiplication of the number i by each number j for example, i = 1 and j = 1 i * j later, increase the number j by 1, i.e. i = 1 and j = 2 i = 1 and j = 3 ....... i = 1 and j = 10 then i = 2 and j = 1 to the moments when i = 10 and j = 10 hint, use 2 loops for
22nd Sep 2018, 9:40 AM
Daniel (kabura)
Daniel (kabura) - avatar
+ 1
ok, now set "i <= 10" then add the second loop, "for" to increase the number j by 1 tip: for () {      for () {      } } use system.out.print () and system.out.println () to separate lines
22nd Sep 2018, 12:29 PM
Daniel (kabura)
Daniel (kabura) - avatar
+ 1
good work, that's what it was all about, let's keep it that way
22nd Sep 2018, 1:16 PM
Daniel (kabura)
Daniel (kabura) - avatar
0
hai! daneil i got it see is correct or wrong ?
22nd Sep 2018, 6:41 AM
srinu rocky
srinu rocky - avatar
0
hai see this
22nd Sep 2018, 11:13 AM
srinu rocky
srinu rocky - avatar
0
daniel bro see now i got it
22nd Sep 2018, 12:35 PM
srinu rocky
srinu rocky - avatar
0
i never tried this type of loops thx for giving me task
22nd Sep 2018, 12:36 PM
srinu rocky
srinu rocky - avatar
0
thx bro
22nd Sep 2018, 1:19 PM
srinu rocky
srinu rocky - avatar