precision c++
fixed - it is used to forcefully follow precision zero.
example: for 0.5 below code will print 0.500000
cout<<fixed<<setprecision(6)<<num<<endl;
precision c++
fixed - it is used to forcefully follow precision zero.
example: for 0.5 below code will print 0.500000
cout<<fixed<<setprecision(6)<<num<<endl;
set precision in c++
#include <iomanip.h>
#include <iomanip>
int main()
{
double num1 = 3.12345678;
cout << fixed << showpoint;
cout << setprecision(2);
cout << num1 << endl;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us