You will get email Reply within few hours

Wednesday, 24 April 2013

Space travels company trips

’s Space Travel Company has a file that called “TripInput.txt” which contains the following information:
 Trip numberinteger
 Fuel Costdouble
 Waste Disposaldouble
 Miscellaneous Expensedouble



Create two parallel arrays (one for trip number, the other for the final trip cost).
Read in the file, calculates the final cost per trip
Display all information to the monitor including new fuel cost and final trip cost
Stores the trip number and calculated final trip cost in the arrays
Creates an output file called “TripCost.txt” that will write the array in reverse sequence.



Example input and output (comments // are for explanation only, not program output) TripInput.txt should look like this:
111 //trip number 1
100.00 //fuel cost
200.00 //waste disposal
50.00 // miscellaneous expense
222 //trip number 2
200.00 //fuel cost
300.00 //waste disposal
100.00 //miscellaneous expense
The display should look like this:
Welcome to Jim Vandergriff’s Space Travel Company //your name
Trip No Fuel Waste Misc Discount Fuel Final Cost
111 100.00 200.00 50.00 90.00 340.00
222 200.00 300.00 100.00 180.00 580.00
Totals
300.00 500.00 150.00 270.00 920.00
// for 111, discount fuel cost =100*0.9 = 90; total cost =200+50+90=340
// for 222, discount fuel cost =200*0.9 = 180; total cost =300+100+180=580
NewBalance.dat should look like this: //reverse order
222
580.00
111
340.00

EMAIL ME For Solution:
topsolutions8@gmail.com