Choose Category
//SUM OF INTEGERS #include<iostream.h> #include<conio.h> void main() { int num,sum=0; int i,val; clrscr(); cout<<"Enter the number of integers :"; cin>>num; cout<<"Enter the number:"; for(i=0;i<num;i++) { cin>>val; sum=sum+val; } cout<<"Sum of given integers:"<<sum; getch(); }