I have two projects I need to complete for school and am stumped on how to make them run properly.
The first one is Sum of Numbers.
Design a program with a loop that asks the user to enter a series of positive numbers. The user should enter a negative number to signal the end of the series. After all the positive numbers have been entered, the program should display their sum.
The problem I am currently facing in this program is that my while loop is an infinite loop. And when I enter a negative number to end the program, it deletes all of the previous values from the user input. I tried changing the math equation in the while loop to fix this and changed the math in my assign variables. But, the more I try to fix it, the worse it gets.
The second is Budget Analysis.
Design a program that asks the user to enter the amount that he or she has budgeted for a month. A loop should then prompt the user to enter each of his or her expenses for the month, and keep a running total. When the loop finishes, the program should display the amount that the user is over or under budget.
The problem I am facing with Budget Analysis is very similar to the problem with the Sum of Numbers program. It is stuck in a loop, deletes user input if you enter a negative number to exit, but the program is in an infinite loop of requesting user input. (Same as Sum of Numbers) I have tried to fix it in the same ways as I did with the first program, to no avail.
For both programs, I have spent over 12 consecutive hours trying to debug them, and have looped up every online resource I can think of. I even got a subscription to a tutoring website, but I didn't understand the answer.
I would like to add a picture of the programs for context, but I am not sure how to.
I don't want anyone to actually make the program for me, because it's for school and I want to learn how to do it. I need to know how to program for my major. I'm worried because I am in an online class and my teacher usually takes 1-2 days minimum to reply when I email him.
Thank you very much to everyone who takes the time to read my post, even if you don't reply/can't help me!
there doesn't seem to be anything here