#include
#include
using namespace std;
int main()
{
int num,negativeCounter=0,positiveCounter=0,total=0,average = 0;
cout<<"Enter an integer value,the program exits if the input is 0: "<
cin>>num;
int sum = 0 ;
while ( num !=0)
{
sum += num ;
if (num<0)
negativeCounter++;
else if (num>0)
positiveCounter++;
else
cout<<" "<
total=total+num;
average=static_cast
cin>>num;
}
cout<<" The number of positives is "<
cout<<" The number of negatives is "<
cout<<" The total is: "<
cout<<" The average is : "<
system ("pause");
return 0;
}
0 kalam anda:
Post a Comment