Feb 25, 2016 at 12:50am UTC
this are my errors please help
'int fractionType::numerator' is private
int numerator;
^
line: 39 error: within this context
object2 >> myFraction.numerator;
^
error: 'int fractionType::denominator' is private
int denominator;
^
line41 error: within this context
object2 >> myFraction.denominator;
i went and fix the errors now these are the only errors
Last edited on Feb 25, 2016 at 1:26am UTC
Feb 25, 2016 at 2:08am UTC
Help me for getting correct answere.
in this program i want to get answere with tax. But tax function is not working.
#include <iostream>
using namespace std;
struct calls
{
int noOfCalls;
float result;
float condition();
float resultt();
};
float calls :: condition()
{
if (noOfCalls >= 0 && noOfCalls <= 100)
{
result = (noOfCalls + 0.80) * 250;
}
else if (noOfCalls >= 100 && noOfCalls <= 250)
{
result = (noOfCalls + 1.00) * 350;
}
else if (noOfCalls >= 250)
{
result = (noOfCalls + 1.25) * 500;
}
return result;
}
float calls::resultt()
{
if (result >= 1000 && result <= 1500)
result = result *(7 / 100 + 1);
else if (result >= 1501 && result <= 2000)
result = result *(10 / 100 + 1);
else if (result >= 2001)
result = result *(15 / 100 + 1);
return result;
}
void main()
{
calls e1;
e1.result = 0;
cout << "Enter NO of Calls ";
cin >> e1.noOfCalls;
e1.condition();
e1.resultt();
cout << " Your Bill is = " << e1.result;
system("pause");
}