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

what is the core accounts

1687


let me know the meaning and Nature of cash

1516


Provision of Bad Debts is made in compliance with the convention of -----------

1452


what is the meaning of call in arear

1991


What is payment/receipt/period accruals?

1283






AT THE TIME OF REDEMPTION OF DEBENTURES. WHEN THERE IS PROFIT/LOSS ON SALE OF DEBENTURES WE TRANSFER THAT AMOUNT IN PROFIT AND LOSS A/C BUT WHEN WE CANCEL OUR DEBENTURES AFTER BUYING IT FROM OPEN MARKET THE DIFFERENCE BETWEEN MARKET VALUE AND COST OF DEBENTURES TRANSFER TO "CAPITAL RESERVE ACCOUNT .. WHY SO ANY PRACTICAL ANSWER ??

1728


Expand---------TDCB

1433


How to Calculate Mortgage?

1890


what do you meant auction? what is F & o segment?

1832


Dear Sir, My qus is my co. purchase a laptop from Abc.co. for rs-37200 on credit Emi basis from hdfc bank. i paid every month 6200rs as a installment. so i want to know how i make a entry in tally 9. and also want to know i creat laptop ledger under fixed assets or office expenses. plz tel me soon.or mail me .

1639


What is T+2 rolli g settlement cycle?

2005


What do u mean by pass through expenses? give examples, how it will be accounted & billed?

5474


what is finance what is bpo why do u want join a BPO types of process in BPO Company's

1624


Dear All, Please reply ASAP. I have an account with SBI and ICICI bank. I have mention the Authorised bank address of SBI in our Shipping bill and GR. But we have received the Payments in ICICI Bank. Please inform who are able to realise the Bank Realisation Certificate (BRC)ICICI or SBI. Can SBI are quolify for refuse for BRC Application. Please reply of this query on jani_janikalpesh@yahoo.com regards Kalpesh Jani 9978912950

1917


What was the most chlleging task you face while working in SAP FI/MM and how did you solve?

1488