r/shittyprogramming • • 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

24 comments sorted by

View all comments

Show parent comment

11

u/hydrocyanide Sep 14 '18

I can't tell if this is a real solution because, without running it, it sure looks like it will just be a big stack overflow. It's recursion without a base case.

6

u/scooty14 Sep 14 '18

That's the joke. It might seem as a real solution to a beginner seeking help at r/shittyprogramming

1

u/PsikyoFan Sep 14 '18

Except it's really shitty because you made a typo :) The second function calls lcd()...