Join 136,938 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,848 people online right now. Registration is fast and FREE... Join Now!
Here it is: Use QBasic to write a program that allows the user to enter the number of quarters, dimes, nickles, and pennies. The program should translate the coins into a dollar amount and display the result. Your program should include the following:
* A SUB procedure that recieves the number of each coin and translates the coins into a dollar amount.
* Appropriate comments, including your name, a brief summary of the program, and description for each set of statements.
* Descriptive variable names.
* Correct, formatted output.
If you can help me on this or even write a program for me that would be awesome!
I have to have it completed by 6:00pm 3/11/08
I am logged into Windows Live messenger now: Stealth_Tools@Hotmail.com
I would be happy to do your homework for you, but I don't think you professor would approve of PLAGIARISM.
Oh and Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.
Instead post your and we can maybe help you when you get stuck. List your errors and what it should be doing. We can work through this as a team.
Happy Coding!
This post has been edited by Nykc: 11 Mar, 2008 - 11:28 AM
I would be happy to do your homework for you, but I don't think you professor would approve of PLAGIARISM.
Instead post your and we can maybe help you when you get stuck. List your errors and what it should be doing. We can work through this as a team.
Happy Coding!
I don't have a professor.. I am home schooled and have a proctor... I have no clue how to do this and if I had the working code I could learn THIS PROGRAM and take my test and hopefully make a good grade on it... this program is to help me learn before my test
I can paste code I have done in the past but I have no idea on how to do SUB functions...
This post has been edited by StealthTools: 11 Mar, 2008 - 11:30 AM
Ill be around till 4:30 EST. I will do my best to help you
I am EST also
Here's what I have so far:
CODE
DECLARE SUB GetData (Quarters, Dimes, Nickles, Pennies, Total) DECLARE SUB DisplayInfo (Total)
'*** Coin translation ***
'*** This program requires the user to enter a *** '*** number of quarters, dimes, nickles, and *** '*** pennies, Then converts that information to *** '*** a dollar amount. ***
CLS
'*** CALL GetData to Prompt user to enter needed data ***
SUB GetData (Quarters, Dimes, Nickles, Pennies, Total)
CLS PRINT INPUT "Enter the number of quarters:", Quarters INPUT "Enter the number of dimes:", Dimes INPUT "Enter the number of nickles:", Nickles INPUT "Enter the number of pennies:", Pennies PRINT LET Total = (Quarters * 25) + (Dimes * 10) + (Nickles * 5) + (Pennies) PRINT
END SUB
Holey hell???
Is this correct?? I get the right amount of dollars I think!!!!!!
DECLARE SUB GetData (Quarters, Dimes, Nickles, Pennies, Total) DECLARE SUB DisplayInfo (Total)
'*** Coin translation ***
'*** This program requires the user to enter a *** '*** number of quarters, dimes, nickles, and *** '*** pennies, Then converts that information to *** '*** a dollar amount. ***
CLS
'*** CALL GetData to Prompt user to enter needed data ***
SUB GetData (Quarters, Dimes, Nickles, Pennies, Total)
CLS PRINT INPUT "Enter the number of quarters: ", Quarters INPUT "Enter the number of dimes: ", Dimes INPUT "Enter the number of nickles: ", Nickles INPUT "Enter the number of pennies: ", Pennies PRINT LET Format$ = "$$###.##" PRINT LET Total = (Quarters * 25) + (Dimes * 10) + (Nickles * 5) + (Pennies) PRINT
END SUB
Why won't this Format$ work? the program runs fine and then gets an error before calling the total dollar amount.
EDIT: Oh yea, If you logg onto Windows Live messenger I can send you my version of QBASIC 7.1
This post has been edited by StealthTools: 11 Mar, 2008 - 12:06 PM