cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Info on printf("%g")
Info on printf("%g")
Jul 5, 2012 at 6:26pm UTC
tnjgraham
(87)
Hello,
I am working on a project and it has the following lines of code:
1
2
3
4
for
(i = 0; i < n; i++) { printf(
"%25.15g\n"
, d8[i]); }
I have a general idea of what is being done but I do not understand what
printf(
"%25.15g\n"
, d8[i]);
is doing. Can anyone shine some light on this line of code.
Thanks In Advance
Jul 5, 2012 at 6:49pm UTC
TheIdeasMan
(6817)
Hi,
You could google "C++ printf example" to find out all about it.
Google is your friend
The numbers are to do with field width & decimal places.
Jul 5, 2012 at 7:10pm UTC
tnjgraham
(87)
Thanks!!
Topic archived. No new replies allowed.