GIDForums

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 10-Sep-2005, 11:00
ilovethebeach ilovethebeach is offline
New Member
 
Join Date: Sep 2005
Posts: 10
ilovethebeach is on a distinguished road
Question

Need Help W/ Homework Due Tomorrow


I 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  
Old 10-Sep-2005, 11:35
Guidelines Plz Guidelines Plz is offline
Junior Member
 
Join Date: Sep 2005
Posts: 87
Guidelines Plz is on a distinguished road
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  
Old 10-Sep-2005, 12:05
micheldenostra micheldenostra is offline
New Member
 
Join Date: Sep 2005
Posts: 19
micheldenostra is on a distinguished road
Quote:
Originally Posted by ilovethebeach
I 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.


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  
Old 10-Sep-2005, 12:51
ilovethebeach ilovethebeach is offline
New Member
 
Join Date: Sep 2005
Posts: 10
ilovethebeach is on a distinguished road
Quote:
Originally Posted by micheldenostra
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?


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  
Old 10-Sep-2005, 12:55
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,230
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all
Quote:
Originally Posted by micheldenostra
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?
Dude, are you suggesting he should have read your post? With a title like my C program won't run, any suggestions? who's going to know what your post is about? Why should he start reading posts at random?
__________________

Cow: You're a lawyer too?
Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase!
  #6  
Old 10-Sep-2005, 12:57
micheldenostra micheldenostra is offline
New Member
 
Join Date: Sep 2005
Posts: 19
micheldenostra is on a distinguished road
Quote:
Originally Posted by ilovethebeach
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.
same! i'm still stuck on the jellybean assignment, the part right after gas.c, i didn't understand until i went through the book yesterday. the teachers going to leave us both behind unless we pick up, seriously. go through the first three chapters, refer to my 1st post (but don't copy it verbatim). it seems he's teaching the class for people that programmed before; i certainly haven't but you might want to at least consider dropping the class unless you're content with the possibility of flunking the class altogether
  #7  
Old 10-Sep-2005, 12:58
micheldenostra micheldenostra is offline
New Member
 
Join Date: Sep 2005
Posts: 19
micheldenostra is on a distinguished road
Quote:
Originally Posted by WaltP
Dude, are you suggesting he should have read your post? With a title like my C program won't run, any suggestions? who's going to know what your post is about? Why should he start reading posts at random?

i know, i was just telling him to refer to it, sor-ry girlfriend!
  #8  
Old 10-Sep-2005, 14:09
ilovethebeach ilovethebeach is offline
New Member
 
Join Date: Sep 2005
Posts: 10
ilovethebeach is on a distinguished road
Quote:
Originally Posted by micheldenostra
same! i'm still stuck on the jellybean assignment, the part right after gas.c, i didn't understand until i went through the book yesterday. the teachers going to leave us both behind unless we pick up, seriously. go through the first three chapters, refer to my 1st post (but don't copy it verbatim). it seems he's teaching the class for people that programmed before; i certainly haven't but you might want to at least consider dropping the class unless you're content with the possibility of flunking the class altogether

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 GIDBlogMaster?s Degree by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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

All times are GMT -6. The time now is 18:55.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.