cplusplus.com cplusplus.com
cplusplus.com   C++ : Forums : Beginners : help with functions #2
  Search:
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forums
Forums
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programm...
Articles
Lounge
Jobs

-

post  help with functions #2

rr23 (5)
Write a function named Liquid() that has an integer number argument and also has another four integer reference arguments named gallons, quarts, pints, and cups. The passed integers represents the total number of cups, and the function is to determine the number of gallons , quarts , pints and cups in the passed value.
the function should return respective arguments in the calling function. Use the relationships of 2 cups to a pint, 4 cups to a quart, and 16 cups to a gallon.

input:
Enter a amount of cups :19

output
1 gallons
0 quarts
1 pints
1 cups


if anyone can help a would greatly appreciate it.
thank you

|
Ganon11 (54)
This function will be almost exactly the same as your other question.
|

This topic is archived - New replies not allowed.
Home page | Privacy policy
© cplusplus.com, 2000-2009 - All rights reserved - v2.2
Spotted an error? contact us