Sir why in a program cout(output) comes firt and cin(input) comes later
You should know that cout and cin have nothing to do with it's order, you can use them as you want. cout : display (output) cin : read (input)
It doesn't have to be that way If you want. But the majority of the times you want to tell the user what you need him to enter, and that's why you use cout first.