Remember to checkout the Codesnip below to review the C++ code yourself! Feel free to copy the code, but I ask that you please provide credit if you leave the code unchanged when you use it.
//Programmer: Nazmus //Program: Tip Calculator - Void Function Tutorial //Website: www.EasyProgramming.net #include<iostream> using namespace std; void tipcalc(int people, float bill, float tip); int main() { int people; float bill, tip; cout << "How much is the bill? "; cin >> bill; cout << "How many people will be splitting the bill? "; cin >> people; cout << "What is the percentage of the tip? "; cin >> tip; tipcalc(people, bill, tip); system("pause"); } void tipcalc(int people, float bill, float tip) { float totaltip, total; totaltip = bill * (tip/100.); total = (totaltip + bill)/people; cout << endl; cout << "The total tip at " << tip << "% is $" << totaltip << '.' << endl; cout << "Each person will pay $" << total << '.' << endl; }