//WAP TO PROGRAM TO PRINT SUM OF NEGATIVE NUMBERS,
//SUM OF POSITIVE EVEN NUMBERS,SUM OF POSITIVE ODD NUMBERS
//FROM A LIST OF NUMBERS ENTERED BY THE USER.
//THE LIST TERMINATES WHEN THE NUMBER ENTERED IS ZERO
#include<iostream.h>
#include<conio.h>
void main()
{
	int num,sumneg,sumeven,sumodd;
	sumneg=sumeven=sumodd=0;
	clrscr();
	do{
		cout<<"\nEnter a number(0 to terminate): \n";
		cin>>num;
		if(num<0)
			sumneg+=num;
		else if(num%2==0)
			sumeven+=num;
		else
			sumodd+=num;
	}while(num);
	cout<<"\n Sum of negative numbers = "<<sumneg;
	cout<<"\n Sum of positive even numbers = "<<sumeven;
	cout<<"\n Sum of positive odd numbers = " <<sumodd;
	getch();
}

