//WAP TO PRINT LARGEST EVEN AND LARGEST ODD NUMBER FROM A LIST OF NUMBERS
//ENTERED THE LIST TERMINATES WHEN ZERO IS ENTERED
#include<iostream.h>
#include<conio.h>
void main()
{
	clrscr();
	int num,leven=0,lodd=1;
	cout<<"Enter numbers (0 to terminate) \n";
	do
	{
		cin>>num;
		if(num%2==0)
		{
			if(num>leven)
			leven=num;
		}
		else
		if(num>lodd)
			lodd=num;
	}while(num);
	cout<<"\n Largest even number ="<<leven;
	cout<<"\n Largest odd number ="<<lodd;
	getch();
}