#include<iostream.h> #include<conio.h> int main() { int i=1,sum=0; while(i<=10) { sum+=i; i++; } cout<<"Sum :"<<sum; getch(); return 0; }
Tags:
C++ program to calculate the sum of first 10 natural number.
c++ programming
manjeet singh kuthar
mskuthar