In first example i dont understand the functioning of %d and %i

I dont understand the meaning of %d and %i which is used in first example.

Hello Saurabh, %d is used as a placeholder for numeric or decimal values. It is just like formatting here wherever %d is placed in the string then it means that that is the position of an integer value. And that integer value is equal to the value that is denoted outside the string by using %variable. So here %variable is %i and here i is an integer.
I hope it is clear to you. In case it is clear to you pls mark it as resolve and provide the rating as well as feedback so that we can improve ourselves.
In case there is still some confusion pls let me know, I will surely try to help you out.
Thanks :slight_smile:
Happy Coding !!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.