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.

why to use %d

0 votes
asked Nov 18, 2018 by Shankargouda Rayanagoudra (130 points)

3 Answers

0 votes
answered Nov 18, 2018 by anonymous
If we are using integer  data type we use %d .
commented Nov 18, 2018 by anonymous
for showing integer value it is a format specifier
+1 vote
answered Nov 20, 2018 by Aftabalam (160 points)
if we r using int so we need to use %d
+1 vote
answered Nov 21, 2018 by srikanth vuyyuru (210 points)

% is an Format specifier 
D is used to represent Integer 

so both together tells the compiler that the input is of Integer format and to store the same in Integer Variable 

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