std::cout << "Goal Number "<<std::setprecision(1);
int Z;
cin >> Z;
std::cout << "Goal Number is "<< Z <<"\n";
start:
std::cout << "Input root "<<std::setprecision(8);
float X;
cin >> X;
float multiply;
multiply=X*X;
For example if I type 4.4
, the value 4
is getting printed. But the remaining 0.4 is going on the next variable, which is float
. Is there any way to stop this?
Thanks in advance.