0

I'm looking for smallest common multiple, but my code doesn't work

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

25th Jul 2019, 3:15 PM
Hoh Shen Yien
Hoh Shen Yien - avatar
9 Respostas
0
Can you explain more please?
25th Jul 2019, 3:24 PM
Cout
Cout - avatar
0
I wanted to make sure n can be divided by all the numbers from 1 to 20 in the set, but it seems like my code will loop endlessly. I think the problem is on line 8 or 9
25th Jul 2019, 3:27 PM
Hoh Shen Yien
Hoh Shen Yien - avatar
0
I mean I can make it in c++.... You want N to be divided by all the numbers between 1-20? for example if n is 2 and the number is 2 it will print 1?
25th Jul 2019, 3:29 PM
Cout
Cout - avatar
0
Yeah, I actually can solve it mathematically, just trying to solve it by codes
25th Jul 2019, 3:31 PM
Hoh Shen Yien
Hoh Shen Yien - avatar
0
Yeah I guess you can it's not really hard for some people atleast would you like me to make it in c++?
25th Jul 2019, 3:32 PM
Cout
Cout - avatar
0
But I don't know C++,so I guess no need, but thanks anyways😁
25th Jul 2019, 3:34 PM
Hoh Shen Yien
Hoh Shen Yien - avatar
26th Jul 2019, 12:04 AM
Steven M
Steven M - avatar
26th Jul 2019, 12:55 AM
Hoh Shen Yien
Hoh Shen Yien - avatar