r/shittyprogramming • u/FritangadeLuka420 • Sep 14 '18
Beginning in C++
I'm working in a small homework and the last step is calculate the least common multiple but with easy steps like if or something like that, could someone help me?
14
Upvotes
View all comments
Show parent comment
4
u/bolche17 Sep 14 '18
It is impossible without a loop of some kind (while, for, recursion, etc). Unless you already know the maximum value of the factors