![]() |
|
#1
|
|||
|
|||
Need Help W/ Homework Due TomorrowI just started C Programming, I am a Junior in college. I thought I was a wizard at computers until I sat one day in my class. I have been lost since day one. Can someone help me with my homework? I am stuck. Thanks a million.
Problem A: Gas Expenses You are in college now and want to estimate how much you will spend on your car for gas each month, so that you have some idea how much money you'll have left over for other things. The information you will collect from the driver is: 1. How many miles per gallon your car gets. 2. The size of your gastank in gallons. 3. The price of gas per gallon. 4. The number of miles you drive in a month. Prompt the user to input these four values. You will output a single statement listing the cost of gas money for one month. Input Specification 1. miles per gallon, size of the gastank and the number of miles driven in a month will all be positive integers. 2. The price of gas per gallon will be a positive real number (to two decimal places), in dollars. Output Specification Output the cost in dollars of gas for a month to two decimal places. Your output should follow the format below, where XX.XX is the cost in dollars to build the goldfish tank. The cost of gas for the month is $XX.XX. Output Sample Here is one sample output of running the program. Note that this test is NOT a comprehensive test. You should test your program with different data than is shown here based on the specifications given. The user input is given in italics while the program output is in bold. Sample Run How many miles per gallon does your car get? 24 What is the size of your gastank in gallons? 12 What is the price of gasoline per gallon? 3.00 How many miles do you drive in a month? 1000 The cost of gas for the month is $125.00. |
|||
|
#2
|
|||
|
|||
|
Welcome ilovethebeach (so do I
Yes we can help you, but you obviously didn't bother reading the http://www.gidforums.com/t-5566.html. Please do so, concentrating on #1, 2, 3, 4, 5. And add the info needed here, as #6 suggests. Unless you post code, we can't help since we don't know what you've tried. And unless you explain what you are having difficulties with, we can't make suggestions. |
|
#3
|
|||
|
|||
|
Quote:
dude i already asked the specifics of this question under my post, you should at least try to put the skeleton of the system together, because if you can't do that you'll fail the class, are u at UCF too? |
|
#4
|
|||
|
|||
|
Quote:
I am at U Can't Finish too! I can't stand my instructor. I cannot learn in that class. I haven't ever even seen C Programming up until two weeks ago. So that will tell you how lost I am. |
|
#5
|
||||
|
||||
|
Quote:
__________________
Cow: You're a lawyer too? Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase! |
|
#6
|
|||
|
|||
|
Quote:
|
|
#7
|
|||
|
|||
|
Quote:
i know, i was just telling him to refer to it, sor-ry girlfriend! |
|
#8
|
|||
|
|||
|
Quote:
I cannot get jGrasp to work with the Hello World project that I copied from the teachers website. I have one of my settings wrong and I cannot figure it out. I can't drop the class, I can't drop below full time. |
Recent GIDBlog
Master?s Degree by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| read file into array | Requoter | CPP / C++ Forum | 9 | 28-Mar-2005 22:39 |
| C if/else statement problem | JYGUTI | C Programming Language | 1 | 28-Mar-2005 05:58 |
| C++ Homework Due Tomorrow. Help! | snatbot | CPP / C++ Forum | 3 | 02-Mar-2005 15:34 |
| help with tele directory problem due tomorrow | wbsquared03 | CPP / C++ Forum | 5 | 01-Nov-2004 23:10 |
| help!!!!!!!! C++ homework | newbie | CPP / C++ Forum | 2 | 20-Jan-2004 09:41 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The