- Challenge 6 10 2 Pass By Reference Activity 301722 2037154xxxxy7 Jump To Level 1 Define A Function Getvolume That Ta 1 (14.08 KiB) Viewed 31 times
CHALLENGE 6.10.2: Pass by reference. ACTIVITY 301722.2037154xxxxy7 Jump to level 1 Define a function GetVolume() that ta
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
CHALLENGE 6.10.2: Pass by reference. ACTIVITY 301722.2037154xxxxy7 Jump to level 1 Define a function GetVolume() that ta
CHALLENGE 6.10.2: Pass by reference. ACTIVITY 301722.2037154xxxxy7 Jump to level 1 Define a function GetVolume() that takes two parameters passed by reference. The function reads two integers from input as gallons and pints in this order. The function does not return any value. Ex: If the input is 20 2, then the output is: 20 gallons and 2 pints 1 #include <iostream> 2 using namespace std; 3 5 6 int main() { 7 9 10 11 12 13 14 15} 법 int usrGallons; int usrPints; Get Volume(usrGallons, usrPints); cout << usrGallons << gallons and << usrPints << pints" << endl; return 0; II 2 3