Okay, so like many others i have an issue. I have written a pseudocode that is supposed to represent the issue below.
#1 Write pseudocode for a program that calculates the service charge a customer owees for writing a bad check. Okay, i got everything right except my teacher turned back to me saying that she wants to give me credit, but I am missing another "get" or this will end up in infinite loop. I am confused, I printed out output and put a stop. I am definitely missing something and have gotten 100% in class so far.
I will never post anything I haven't worked on, and just hope for a little extra push in the right direction from some individuals who know the answer. TIA
I suppose I should post the assignment so I can clear that up. Basically the check should keep incurring charges monthly on the 1st until check is paid. Hence the reason for my get while. I believe this seems strange that both gets are during the while, but for some reason my teacher said this was fine, I am just missing a get. I know I'm missing something here.
Here is the actual question
Design a pseudocode for a program that calculates the service charge a customer owes for writing a bad check. Program accepts customers name, the date the check was written, the current date, and the amount of the check in dollars and cents. The program continues until an eof value is encountered. The service charge is $20 plus 2% of the amount of the check, plus $5 for every month that has passed since the check was written. A check is one month late as soon as a new month starts - so a bad check written on September 30 is one month overdue on October 1st.
There should be another GET following the print. If it is not there, you will be in an indefinite loop. You read the first record prior to the WHILE. The first statements process the record you read first. After that happens, which is after the print, you need to get the next record to process. Otherwise, you will just process the first record again.
If that does not make sense, let me know. I am sending this back so that you can get the second Get in.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.