Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

setprecision in c++

#include<iomanip>
#include <iostream>
using namespace std;

int main()
{
   int num = 45;
  cout << "it is: " << fixed << setprecision(2) << num << " the end"<< endl;
  
  return 0;
}
 
PREVIOUS NEXT
Tagged: #setprecision
ADD COMMENT
Topic
Name
2+2 =