for instance I had set the display format of a program at the very beginning such as format shortG
and then I would like to use the fprintf
command to display a certain values.
For example I have
x = 1.23456789
y = 12.3456789
If under format shortG it will show x = 1.2346 and y = 12.346. My question is what format I should use when using the fprintf
because like if using %.4f
y will equal to 12.3457 which is not what I want. Thanks for every single help.