So I changed some things around and now this is the Error I get when trying to compile...
TP.cc:15:9: error: missing terminating " character
TP.cc:15: error: missing terminating " character
TP.cc: In function âint main()â:
TP.cc:27: error: expected primary-expression before âifâ
TP.cc:27: error: expected `;' before âifâ
#include <iostream>
using namespace std;
int main()
{
char get_call_period; // To get Call period D/day E/EveningW/NightNWknds
double get_call_duration; // To get call dur in mins and secs.
double compute_call_cost; // To calculate the cost of the call.
double report_call_cost; // Report the total converted cost back to the user.
//This will display the company of the telephone service as well as the ver,
// and my name, copyright, and date.
cout << "High-Strung Long-Distance Telephone Service Program, version";
cout << "1.0" << endl;
cout << "(C) Josh Preston 2011" << endl;
cout << " Enter the period, either N, D or W for Weekends and nights "
<< endl;
cin >> get_call_period;
cout << "Enter the duration of the call in minutes: " << endl;
cin >> get_call_duration;
// Determine the period of the call and calculate for N and W.
#include <iostream>
usingnamespace std;
int main()
{
char get_call_period; // To get Call period D/day E/EveningW/NightNWknds
double get_call_duration; // To get call dur in mins and secs.
double compute_call_cost; // To calculate the cost of the call.
double report_call_cost; // Report the total converted cost back to the user.
//This will display the company of the telephone service as well as the ver,
// and my name, copyright, and date.
cout << "High-Strung Long-Distance Telephone Service Program, version";
cout << "1.0" << endl;
cout << "(C) Josh Preston 2011" << endl;
cout << " Enter the period, either N, D or W for Weekends and nights "
<< endl;
cin >> get_call_period;
cout << "Enter the duration of the call in minutes: " << endl;
cin >> get_call_duration;
// Determine the period of the call and calculate for N and W.
if (get_call_period == 'W')
{
report_call_cost = (get_call_duration * .4);
}
if (get_call_period == 'D')
{
if (get_call_duration > 0 && get_call_duration <=3)
{
report_call_cost = (get_call_duration + .33);
}
report_call_cost = (get_call_duration * 9);
}
if (get_call_period == 'E')
{
report_call_cost = (get_call_duration * 7);
}
cout << "Your " << get_call_duration << "minute " << get_call_period << "call will cost: " << report_call_cost << endl;
return 0;
}
this isnt my response i just need to read your code easier