I'm just starting to learn C++ and am having difficulty on a project. I've got some of it figured out, but now need help with the calculations to output the phone bill total, then amount received by customer in pennies. I basically need to it display as the sample output listed below. Any help is appreciated, thank you!
Sample Output:
Enter the name of the customer: Larry Smith
Enter street address: 122 Main Street
Enter city: Charlotte
Enter state: NC
Enter zip code: 23499
Enter the number of minutes used: 157
Larry Smith
122 Main Street
Charlotte, NC 23499
Amount Owed: $31.40
#include<iostream>
#include<string>
usingnamespace std;
int main()
{
string name, street, city, state;
int zip, minutes;
cout << "Enter the name of the customer: ";
getline(cin, name);
cout << "Enter Street Address: ";
getline(cin, street);
cout << "Enter city: ";
cin >> city;
cin.ignore(INT_MAX, '\n');
cout << "Enter state: ";
cin >> state;
cin.ignore(INT_MAX, '\n');
cout << "Enter zip code: ";
cin >> zip;
cout << "Enter the number of Minutes used: ";
cin >> minutes;
cout << name << endl;
cout << street <<endl;
cout << (city, state) << endl; // need help displaying city, state next to each other
cout << zip << endl;
cout << minutes << endl;
return 0;
}
theturk1234, as i'm just learning, this is what I have so far which displays the name, street, city, state and zip and minutes used but I need help with having it display:
Amount Owed: $31.40 (after typing in 157 minutes used)