Our Recommendation for You Search your Query, You can find easily. for example search by book name or course name or any other which is related to your education

Followers

how to calculate the sum of first 1000 integers



 This is the source code to calculate the sum of first 1000 integers
#include <iostream.h>
main()
{
        int sum, number;
        sum = 0;
        number = 1;
     while(number <= 1000)
{
      sum = sum + number;

      number = number + 1;
}
    cout << "The sum of first 1000 integers starting from 1 is " << sum;
getch();
 }
End