From here we can see that the compiler adds up all the 5 numbers.My question is how should i put it so it would display" total: N1+N2+N3+N4+N5=XX "instead of adding all the numbers up then display "total:XX"
See my last answer to your previous question. You really need to study the C language further in order to understand some of the answers given here. Most of the people providing answers here are assuming that you have a basic knowledge of all C language constructs; your supplementary questions make it clear that you have not.
This is not a criticism of you (we all had to start somewhere), rather advice on how to get to the place you want to be.
So if he's any good at his job he has taught you all you need to know to solve the problem you have been given. Maybe you need to read through your notes again, to refresh your memory of the bits you have been studying. As my mentor 'Big John' was fond of repeating ad nauseam: "practice, practice, practice".
You can't eat your cake and have it too. Think about it: if you are not somehow saving each value that is input (i.e., you are reusing number each time), how could you expect to display those after the while() loop ends?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Msg.Fomrat("This is a long first line to display here to make my point\nThis is a long Second line to display here to make my point");
This is a long first line to display here to make my
This is a long Second line to display here to make my
Can I resize the box to make the first and second line fit without breaking them?
Last Visit: 31-Dec-99 19:00 Last Update: 3-Dec-22 22:40