Assignments » Flow Of Control » Set 2 » Solution  2

Source Code: 


#include<iostream>
using namespace std;

int main()
{
 int i=1,sum=0;

 while(i<=10)
 {
  sum+=i;
  i++;
 }

 cout<<"Sum :"<<sum;

    
 return 0;
}



Post a Comment

 
Top