Which function to get it a number with some digits
You must be logged in to reply to this topic.
Hello,
Could anybody please help me soon:
In C++, a number x= 367.1234444444444444444. I only want to get x=367.123 or x=367.1234 (some digits after the sign “.”) Which function to get it?
Thank you in advance.
Pedro
If you mean to print something in console, then you may use
fprintf(stderr, "n%4.3d", x);
You must be logged in to reply to this topic.