You are on page 1of 1

Dietel and Dietel Exercise Solution 2.

39(b)
============================================
#include<iostream.h>
void main()
{
int value;
cout<<"Enter the value";
cin>>value;
switch(value%2)
{
case 0:
cout<<"even"<<endl;
case 1:
cout<<"odd"<<endl;
}
}

http://www.ravianeducation.blogspot.com
FARHAN: 03008855006

You might also like