try this
for(i=0,sum=i;i<=10;i++,sum=sum+i)
just check for the number of iterations becaues i am not sure about it.
zulqrnain alisial <[EMAIL PROTECTED]> wrote:
zulqrnain alisial <[EMAIL PROTECTED]> wrote:
try this in C++ main()int sum=0for (int i=1;i<=10;i++){sum+=i;}cout<<sum;
surya battina <[EMAIL PROTECTED]> wrote:hi allcan u give the idea to sum all digits of a 10 or more digited number using single statement.
Do you Yahoo!?
Jazz up your holiday email with celebrity designs. Learn more.
To unsubscribe : [EMAIL PROTECTED]
Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now
To unsubscribe : [EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
To unsubscribe : [EMAIL PROTECTED]
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To reply to this message, go to:
http://groups.yahoo.com/group/Programmers-Town/post?act=reply&messageNum=4931
Please do not reply to this message via email. (more info)
- To visit your group on the web, go to:
http://groups.yahoo.com/group/Programmers-Town/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
