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.

what is%2d and %4.6f

–1 vote
asked Feb 7, 2019 by anonymous

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>
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..
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]
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.
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.
...