#include <iostream>
#include <sstream>
using namespace std;
using std::stringstream;
using std::cout;
int main()
{
double value;
cout << "Enter a number : " << endl;
cin >> value;
cout << "The exact number : ";
cout << value << endl;
system("pause");
}
After i wrote this code, i found out that the double of every variable will rounded off in the IF ELSE statement, how can i take the exact value of input to the IF ELSE statement? For example: The input is 0.007447 and if input is less than or equal to 0.007447 it will prompt another input. But in this case, after the user input is 0.007447 and it will be rounded off to 0.00745, Thus it will runs the else statement but not the if statement.