function prototype.

Hello.well,i'm a new forumer.i'm still new to the C++ programming and already got assignments that i could'nt think how to do it.So,i really hope that some of you can help me to do this assignments.Hopefully,i can solve this assignments as soon as possible.Below are the questions:

1.Write a program with function prototype that asks the user to input
-The number of gallons of gas in the tank.
-The fuel efficiency in miles per gallon
-The price of gas per gallon.

Then print the cost per 110 miles and how far the car can go with the gas in the tank.

hint:

1st function-user input
2nd function-calculation
3rd function-display


2.Write a program that can do the following tasks,with no specified input.

a.Read floating number and print the largest value.
b.Read floating number and print the smallest value.
c.Read floating number and print.
d.Read floating number and print the average number.

hint:use function for each task.


Really hope for your help.Thank you.
This is so basic there isn't much we could do besides just give you the answer. You might want to take a read through the tutorial -- particularly the section on control structures
http://www.cplusplus.com/doc/tutorial/

If that doesn't help then you need to go visit with your professor.

Good luck!
Topic archived. No new replies allowed.