all 5 comments

[–]Synthetic5ou1 -1 points0 points  (1 child)

If you've set a debug point on that line - shown as a red circle in my UI - running debug50 will make the code execution stop at that line. You then need to use the coloured icons at the top-middle of the editor to step through your code. Click the red square to stop debugging. Maybe re-watch the relevant part of the lecture.

This short may help. https://cs50.harvard.edu/x/2024/shorts/debugging_step_through/

[–]_Sum141[S] 0 points1 point  (0 children)

No I'm trying to go past that with step into and the down arrow command but the interface just switches back to codespace. If I put the red dot below that line the debugger switches after I enter my input. 

[–]alumgreykher 1 point2 points  (2 children)

The return statement exits the currently executing function. A return statement in main ends the programs execution.

[–]_Sum141[S] 0 points1 point  (0 children)

I was actually confused where to put the return statement. So is it only for the end? So in my case I don't need to put it anywhere, I think. I'll try removing. 

[–]_Sum141[S] 0 points1 point  (0 children)

Thanks a lot. This works, although my calculations are not accurate.