some one tell me that if we want to terminate this program on -1 then which condition we use..
please help...
#include <iostream.h>
#include <conio.h>
main()
{
int arr[10],i,sum=0;
for(i=0;i<10;i++)
{
cout<<"Enter values:";
cin>>arr[i];
sum=sum+arr[i];
}
cout<<"Sum is equal to="<<sum;
getch();
}