program on C++ visual on how to display numbe

March 10, 2011 at 02:08:55
Specs: Windows XP
i want the output to be like this
ex:
1
2
3
4
5
6
7
8
9
10
total : 55

See More: program on C++ visual on how to display numbe

Report •


#1
March 10, 2011 at 18:18:40
try a loop: output the iterator current value, sum the iterator, and upon loop termination print the sum result or.... just use cout to print the desired effect and call it a day. :P


Report •

#2
March 11, 2011 at 03:46:15
can u give me the loop syntax that u are using????

Report •

#3
March 11, 2011 at 04:35:27
If you don't know the syntax for a loop you need to go back to page one and start again.

One of the essential requirements to be a programmer is the ability to think for your self and work things out. If you cannot do that then I would think of another vocation.

It is not a matter of knowing everything there is to know, more of knowing where to find the answer and in this day and age, Google is usually a good place to start.

http://www.google.co.uk/search?hl=e...

Stuart


Report •

Related Solutions

#4
March 11, 2011 at 12:16:00
I don't know really - loops and I aren't friends and we disagree all the time. :D Seriously, odds are the chapter on looping has an example that can be modified to work; there are many folks here who will gladly help you out provided that you give it a whirl first.

<PRE>
your loop code
</PRE>


Report •

#5
March 16, 2011 at 01:49:32
well tnx anyways... i better go back to library now hehehe ...

Report •

Ask Question