| | |
Not asking for hand outs, just a little help
Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
![]() |
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
Here is my code
#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
Here is my code
Start
Get input
currYY
curmm
curdd
chkYY
chkmm
chkdd
chkAmount
While not eof
chkAmount1 = 20 + chckAmount * .02
chkAmount2 = 12*(currYY – chkYY) + (curmm – chkmm) *5
chkAmount1 + chckAmount2 = chkFee
print calculatedAnswer chkFee
End While
Stop 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.
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.
Well, here is what my teacher wrote.
I guess my issue is...What are you "getting"?
•
•
•
•
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.
Something from the file

The teacher means that you'll have to read something from the file in the
while !eof loop.So something like :
While not eof
read stuff from file
do stuff![]() |
Similar Threads
- Send data on a serial port (C++)
- Help for a VB Newbie (VB.NET)
- Can you identify this motherboard? (Motherboards, CPUs and RAM)
- sound cards (PCI and Add-In Cards)
- vectors and classes (C++)
- Error in compiling matrix (C++)
- Error compiling complex.cpp (C++)
- Does neone know???? (Java)
- Unknown Error when trying to start WindowsXP (Windows NT / 2000 / XP)
Other Threads in the Computer Science Forum
- Previous Thread: I am having difficulty writing pseudocodes?
- Next Thread: design a algo with specific time complexity
Views: 1172 | Replies: 6
| Thread Tools | Search this Thread |
Tag cloud for Computer Science
ai algorithm algorithms assignmenthelp assignments automata battery bigbrother binary bittorrent bizarre bletchleypark blogging bomb business clueless codebreaker compiler computer computerscience connect conversion csc data dataanalysis dataintepretation development dfa dissertation dissertationthesis dissertationtopic employment energy extensions foreclosure foreclosuresoftware fuel geeks givemetehcodez government graphics hardware history homeowners homework homeworkassignment homeworkhelp humor ibm idea ideas internet iphone ipod jobs kindle laser laws lazy linkbait lsmeans mainframes marketing mining mobileapplication msaccess nano netbeans news os p2p parser piracy piratebay principles programming rasterizer research sam-being-cute sas science security simulation software spoonfeeding spying sql sql-server stephenfry student supercomputer supercomputing sweden syntactic technology turing turingtest two'scompliment warehouse ww2






