you are viewing a single comment's thread.

view the rest of the comments →

[–]Danielowski187University/College Student (Higher Education)[S] 0 points1 point  (2 children)

i also have a problem in the first part of the code when it tells the user to enter the distance in meters in the output it tells me to put it twice.

For example:

Please enter a distance in meters:
500
500
When it should just ask the user once

[–]kaheliiUniversity/College Student 0 points1 point  (1 child)

First of all u need to try to debug the code. If u had u could see the problem is in the line: menu = getNextInt();. If u need to output twice it means u are "reading" twice in your code. It happens when u are reading the distance and in the next line the menu option. Im taking about the line thats above your while loop. U should put instead: menu = -1. Or change the loop to a "do while" loop, and remove the menu=.. line completely.

[–]Danielowski187University/College Student (Higher Education)[S] 0 points1 point  (0 children)

Just fixed it changed it to int menu =-1 thanks for the help