Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
what is%2d and %4.6f
–1
vote
asked
Feb 7, 2019
by
anonymous
Your answer
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
4 Answers
0
votes
answered
Feb 7, 2019
by
anonymous
%2d means it leaves 2 space gap
simillary %4.6f
commented
Feb 7, 2019
by
anonymous
no there no way <check your answer>
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
0
votes
answered
Feb 7, 2019
by
anonymous
%4.6 is not working in c compiler because of single %,but again if we use % for @ times ,then the answer will not print ......other wise we can use %.2f to print only 2digits after decimal..
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
0
votes
answered
Feb 9, 2019
by
anonymous
Can you explain the function for % as a %d, also I am still learning to code at a proficient level.
to whomever attaches a set of instruction for me to solve please Email
[email protected]
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
0
votes
answered
Feb 11, 2019
by
Bhanu pratap sunda
(
140
points)
here %d is used for integer output and %2d is used when there are 2 input or outputs .
and %4.6f is used for input or output like 2231.66 where there are 6 digits in a number and 4 digits are before point.
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...