Add n numbers using dev C++
========================================================================
#include<iostream>
using namespace std;
main()
{
int sum=0,n,nums;
cout<<"Enter total Numbers to add\n";
cin>>n;
cout<<"enter numbers\n";
for(int i=0;i<n;i++)
{
cin>>nums;
sum=sum+nums;
}
cout<<"Sum of two numbers\n";
cout<<sum;
}
======================================================================
Code By : Kabeer Hussain
0 comments:
Post a Comment