Its better if you have an array of 10 ints and then put down a for loop to check whether its positive or negative and add them up.
If you have variables like this., IT WILL TAKE A LONG TIME TO WRITE IF LOOPS. AND THEN ADD.
to check if its negative or positive.
you can use.
if(var<0)
{
cout<<"negative";
}
else
{
cout<<"POSITIVE";
}
Sky Diploma
Practically a Posting Shark
865 posts since Mar 2008
Reputation Points: 673
Solved Threads: 131