we provide you the c downloads,c programing,c tutorials and much more at www.cplusplus-in.blogspot.com.Codes of c++ are also there for your help.This blog build your c programing style.
Wednesday, 20 June 2012
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
thank you for sharing nice article in your blog
ReplyDeletevisit
web programming tutorial
welookups
copy file examples on
ReplyDeleteCopy a file and reverse case of letters with error checking