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

Short Answer on _________________City Compensatory allowance

1623


what are the difference between banking institutions and financial institutions?

1646


why cost center is assign to gl account in sap

1100


What Are The Characteristics Of Modern Accounting?

4324


what is Calculation of Gross Profit Or Gross Loss?

1843






What is Trade Recovery Estimate and how can we calculate it?

1591


tell me about roll model as father

1823


I WANT ACCOUNT ASSISTANCE INTERWIEV QUETION IN L&T

2150


what do you mean by jounal voucher? Jounal entry for dishonored cheque can be possible thruogh jv?

1842


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

1718


What are direct income and indirect income

1659


About Funding Working Capital to a Company? A company Turn over is 12 Cr, but in the bank statement credits per month is more that 3 Cr? how this could happen? awaiting your views?

1655


What is mean by Reserve on Consolidation?

27258


is there any chance for confilcts between an accountant and a sales executive ? If yes how do you resolve the same as an accountant ?

1702


I need all WNS interview questions

1784