find the sum of all the numbers 1 to 1000

Answer Posted / rahul

int s=0;
for(int i=1;i<=1000;i++)
{
s=s+i;
}
System.out.println(s);

Is This Answer Correct ?    2 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi, I am preparing for Junior Accounts Officers test- APTRANSCO. Can any one suggest the model paper / Books available? john kadapa

1616


What part can management policy play in the analysis of cost behaviour?

1643


Tell me the steps for Import and Export Thanks

1482


i need sbi bank clerk exam model question papers

1932


i want to sit for the written examination held by govt. sector like coal india, ongc for the post of accountant .. qualification ca inter.. plz any1 of u let me know on wht subjects the questions are asked and wht types of questions are asked... plz let me know.. plz

1456






what type of questions are asking for fund administration???

5034


what are the important steps to take during the conversion of an accounting system.

1510


your parents have lent you $20,000 to buy a car and have told you to pay it back whenever you like in conceptual framework

1355


what is undisclosed profit? explain

1968


how will i develop my fears in interviewd?

1587


What is cash clearing account

1407


Why you choose commerce faculty & not science or Why you are in commerce & not in science ?

1673


in case dedit balance of solvent partner and in case credit balance of insolvent partner what i do for accounting on dissolution of partnershio firm give me ans. as per garrner v/s murry rule

2099


hi guys, pls refer me how to preppare for Indian Bank exams.

1957


How can i get GR form (GR No.) for Exports ? please give me a link of website with steps ?

2173