===========================================================================
CODING
#include<iostream.h>
#include<conio.h>
#include<math.h>
#include<stdio.h>
#include<process.h>
#include<all.h>
void main()
{
clrscr();
first();
second();
int a[20],j,i,x,y,t;
textcolor(WHITE);
gotoxy(1,1);
cprintf("Enter nos.: ");
for(i=0,x=16;i<=10;i++,x+=5)
{
gotoxy(x,1);
cscanf("%d",&a[i]);
}
gotoxy(1,7);
textcolor(10);
cprintf("EVEN");
for(i=0,t=15,x=1,y=8,j=1;i<=10;i++,t=15)
{
if((a[i])%2==0)
{
t=10;
textcolor(WHITE);
if(j==1)
{
gotoxy(x,y);
cprintf("ÕÍÍÍÍ");
gotoxy(x,y+1);
cprintf("³ ");
gotoxy(x+2,y+1);
textcolor(t);
cprintf("%.2d",a[i]);
textcolor(WHITE);
gotoxy(x,y+2);
cprintf("ÔÍÍÍÍ");
}
else
{
gotoxy(x,y);
cprintf("ÑÍÍÍÍ");
gotoxy(x,y+1);
cprintf("³ ");
gotoxy(x+2,y+1);
textcolor(t);
cprintf("%.2d",a[i]);
textcolor(WHITE);
gotoxy(x,y+2);
cprintf("ÏÍÍÍÍ");
}
x+=5;
j=0;
}
}
for(i=0,t=15;i<=10;i++,t=15)
{
if((a[i])%2!=0)
{
t=12;
textcolor(WHITE);
if(j==1)
{
gotoxy(x,y);
cprintf("ÕÍÍÍÍ");
gotoxy(x,y+1);
cprintf("³ ");
gotoxy(x+2,y+1);
textcolor(t);
cprintf("%.2d",a[i]);
textcolor(WHITE);
gotoxy(x,y+2);
cprintf("ÔÍÍÍÍ");
}
else
{
gotoxy(x,y);
cprintf("ÑÍÍÍÍ");
gotoxy(x,y+1);
cprintf("³ ");
gotoxy(x+2,y+1);
textcolor(t);
cprintf("%.2d",a[i]);
textcolor(WHITE);
gotoxy(x,y+2);
cprintf("ÏÍÍÍÍ");
}
x+=5;
j=0;
}
}
gotoxy(x,y);
cprintf("¸");
gotoxy(x,y+1);
cprintf("³");
gotoxy(x,y+2);
cprintf("¾");
gotoxy(x-2,y-1);
textcolor(12);
cprintf("ODD");
getch();
getch();
}
CODING
#include<iostream.h>
#include<conio.h>
#include<math.h>
#include<stdio.h>
#include<process.h>
#include<all.h>
void main()
{
clrscr();
first();
second();
int a[20],j,i,x,y,t;
textcolor(WHITE);
gotoxy(1,1);
cprintf("Enter nos.: ");
for(i=0,x=16;i<=10;i++,x+=5)
{
gotoxy(x,1);
cscanf("%d",&a[i]);
}
gotoxy(1,7);
textcolor(10);
cprintf("EVEN");
for(i=0,t=15,x=1,y=8,j=1;i<=10;i++,t=15)
{
if((a[i])%2==0)
{
t=10;
textcolor(WHITE);
if(j==1)
{
gotoxy(x,y);
cprintf("ÕÍÍÍÍ");
gotoxy(x,y+1);
cprintf("³ ");
gotoxy(x+2,y+1);
textcolor(t);
cprintf("%.2d",a[i]);
textcolor(WHITE);
gotoxy(x,y+2);
cprintf("ÔÍÍÍÍ");
}
else
{
gotoxy(x,y);
cprintf("ÑÍÍÍÍ");
gotoxy(x,y+1);
cprintf("³ ");
gotoxy(x+2,y+1);
textcolor(t);
cprintf("%.2d",a[i]);
textcolor(WHITE);
gotoxy(x,y+2);
cprintf("ÏÍÍÍÍ");
}
x+=5;
j=0;
}
}
for(i=0,t=15;i<=10;i++,t=15)
{
if((a[i])%2!=0)
{
t=12;
textcolor(WHITE);
if(j==1)
{
gotoxy(x,y);
cprintf("ÕÍÍÍÍ");
gotoxy(x,y+1);
cprintf("³ ");
gotoxy(x+2,y+1);
textcolor(t);
cprintf("%.2d",a[i]);
textcolor(WHITE);
gotoxy(x,y+2);
cprintf("ÔÍÍÍÍ");
}
else
{
gotoxy(x,y);
cprintf("ÑÍÍÍÍ");
gotoxy(x,y+1);
cprintf("³ ");
gotoxy(x+2,y+1);
textcolor(t);
cprintf("%.2d",a[i]);
textcolor(WHITE);
gotoxy(x,y+2);
cprintf("ÏÍÍÍÍ");
}
x+=5;
j=0;
}
}
gotoxy(x,y);
cprintf("¸");
gotoxy(x,y+1);
cprintf("³");
gotoxy(x,y+2);
cprintf("¾");
gotoxy(x-2,y-1);
textcolor(12);
cprintf("ODD");
getch();
getch();
}
===========================================================================
No comments:
Post a Comment