int item number;
float price; float numsold;
float income; float discount;
My program reads from an input file and output is #sold - price -discount - saleprice - income
my calculations for saleprice returns:
setw(2) returns 5.06 which is correct.
When the program calculates income-
saleprice * numsold the program returns:
setw(2) = 65.75 which is incorrect.
The correct answer is 65.78
RAM is using (65.747498 * 13)=65.747498
How do I correct this problem w/ floating point decimals?
Am I overlooking something simple?
I have tried everything I know of.
Help!!!!!!! Thanks David A Davis
Nash Community College Rocky Mt NC