Hello, I have been having a problem with the following code:
#include<iostream>
#include<time.h>
#include<iomanip>
using namespace std;
int main()
{
float average;
setprecision(5);
fixed;
average = 100-((25/(130-(50-(130/3))))*100);
cout << average << "\n\n";
}
I cannot seem to get the 'average' variable to come out to exactly 79.73 like it should. I have tested out the 'setprecision/fixed' functions, yet the program still produces 100.
Any help is appreciated.