Home » Ask & Discuss » Board Exams - CBSE, ICSE, State Boards » Computer Science « Back to Discussion



Computer Science

New kid on the Block

Joined: 26 Jul 2011
Post: 1
26 Jul 2011 12:52:05 IST
0 People liked this
1
216 View Post
give me example code of while loop add numbers from 1 to 50
None

give me example code of while loop add numbers from 1 to 50


Share this article on:

Comments (1)


New kid on the Block

Joined: 26 Sep 2011
Posts: 4
26 Sep 2011 21:08:45 IST
0 people liked this

#include#includevoid main(){ long sum = 0, i =1; while(i<=50) { sum = sum +i; } cout<<"\nThe sum is "<



Quick Reply


Reply

Some HTML allowed.
Keep your comments above the belt or risk having them deleted.
Signup for a avatar to have your pictures show up by your comment
If Members see a thread that violates the Posting Rules, bring it to the attention of the Moderator Team
Free Sign Up!

Preparing for IIT-JEE ?

Arihant Revision Package for IIT JEE - Books, Practice Tests + Rank Predictor


@ INR 1,995/-

For Quick Info

Name

Mobile No.

Find Posts by Topics

Physics.

Topics

Mathematics.

Chemistry.

Biology

Parents

Board

Fun Zone

Sponsored Ads