ODD OR EVEN...............
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void main()
{
int i,j;
clrscr();
for(i=
1;i<=
10;i++)
{
if(i%
2==
0)
{
cout<<i<<
"is even";
cout<<"\n";
}
else
{
cout<<i<<
"is odd";
cout<<
"\n";
}
}
getch();
}
OUTPUT:
No comments:
Post a Comment