My code has an error and I have no clue why. It works just fine and runs perfectly, but the error will not go away. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

My code has an error and I have no clue why. It works just fine and runs perfectly, but the error will not go away.

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

20th Feb 2022, 2:24 PM
Isaac Palmersheim
2 Answers
+ 3
You have one more It has to be r = rand() % 3 + 1 and add srand(time(0)) as well
20th Feb 2022, 2:37 PM
Мартин 😑🎵
Мартин 😑🎵 - avatar
+ 1
In the scan function if num is not equal to 1 2 or 3 you dont return a value
20th Feb 2022, 2:32 PM
Мартин 😑🎵
Мартин 😑🎵 - avatar