C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 9th, 2005, 06:11 PM
highlander2k5 highlander2k5 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 14 highlander2k5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 12 m 31 sec
Reputation Power: 0
Question help!!!

I'm new to c programming and need some help. My problem is to make a program that calculates mileage reimbursement for a truck driver. Rate of payment is .50 cents for every mile. The program is supposed to get information from the user. i.e. mileage. And some things the program is supposed to have are beginning and ending mileage readings, the miles traveled, and the cost per miles traveled; the reimbursement. Please HELP!!!!! what do I do???

Reply With Quote
  #2  
Old September 9th, 2005, 07:57 PM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 5
Send a message via AIM to Geo.Garnett
Smile

Well, Highlander are you currently reading and learning about C/C++ or do you just want people to give you some examples on ways of how you could do this or what exactly are you asking here. Do you want someone to write that program for you? I guess alls I'm saying is, is that's not a very direct question it is pretty broad, your going to have to narrow this topic down because some one will have to explain to you the whole process of writing a program, as your question stands right now. So any how, let me know either way, and I might be able to help you out. =)..

Reply With Quote
  #3  
Old September 9th, 2005, 08:00 PM
highlander2k5 highlander2k5 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 14 highlander2k5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 12 m 31 sec
Reputation Power: 0
reply

I just started reading and now I'm trying this out. If you could give some examples that would be great.

Reply With Quote
  #4  
Old September 9th, 2005, 08:40 PM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 5
Send a message via AIM to Geo.Garnett
Well, first off before I get started what compiler are you using and second I will have to do most of my explaining in C++, and third you are going to have to tell me were you are getting stuck at, that way I can help you a little better and in plus this will probably take a bit to write so you are going to have to work along side of me if I'm going to help you.

C++ is basically the super set of C so don't worry anything you write in C will be compatible with C++ but stuff I write in C++ will not be compatible with C unless you add specific libraries, that's why it is important to know what compiler you are using as well as how up to date you libraries are in that compiler. If you don't understand what I'm saying or you don't really know much about your compiler I would suggest downloading Dev C++ so that we will be on the same page.
http://bloodshed.net/
Download the latest version and install, don't worry its free ware so no charge and it is a good, easy to use compiler.

Any ways I have some other assignments I have to do tonight so I probably wont be able to start this project till tomorrow but I will still be on until later in order to answer any further questions. I would suggest giving me as much details on this subject as you can as far as above and beyond what you have already written if necessary..

Reply With Quote
  #5  
Old September 9th, 2005, 11:21 PM
B-Con's Avatar
B-Con B-Con is offline
:bcon: moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: int main()
Posts: 351 B-Con User rank is Private First Class (20 - 50 Reputation Level)B-Con User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 23 h 14 m 46 sec
Reputation Power: 5
I really, really hope this isn't a HW assignment....

Here's your basic algorithm:

- Input starting mileage
- Input ending mileage
- Calculate mileage driven (end - beginning)
- Determine how much money to pay, based on $.50 per mile (mileage * .50)
- Input the cost of driving per mile
- Determine the total cost of driving (cost * mileage)
- Add the cost and the money/wages (cost + wages)

Does that make sense?
__________________
Officially a member of the Itsacon fan club. Beer blasts are every friday at Viper_SB's house. I bring the chips.



Reply With Quote
  #6  
Old September 10th, 2005, 11:27 AM
highlander2k5 highlander2k5 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 14 highlander2k5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 12 m 31 sec
Reputation Power: 0
I was able to figure it out now... thanks for the help consideration

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > help!!!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 11 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek