===========================================================================
CODING
#include<all.h>
void main()
{
int i,z,x,y,s,q,o;
char n[80];
clrscr();
cout<<"Enter Paragraph: \n";
gets(n);
for(i=0,x=1,y=23;i<=18;i++,y--)
{
gotoxy(x,y);
cprintf("%d",i);
}
for(i=0,x=3,y=23;i<=19;i++,y--)
{
gotoxy(x,y);
if(i==0)
cprintf("┴");
else if(i==19)
cprintf("▲ ");
else
cprintf("┤");
}
for(i=1,x=5,y=23;i<=26;i++,x=x+3)
{
if(i==1)
{
gotoxy(4,y);
cprintf("─");
}
gotoxy(x,y);
if(i==26)
cprintf("╜",i);
else
cprintf("╨───",i);
gotoxy(x,y+1);
cprintf("%c",(char)(i+64));
}
for(i=1,z=97,x=65,y=22,s=5,o=0;i<=26;i++,z++,x++,y=22,s=s+3,o=0)
{
for(q=0;n[q]!='\0';q++)
{
if(n[q]==x || n[q]==z)
{
gotoxy(s,y);
cprintf("║");
y=y-1;
o=1;
}
}
if(o==1)
{
gotoxy(s,y+1);
cprintf("╦");
}
}
getch();
}
CODING
#include<all.h>
void main()
{
int i,z,x,y,s,q,o;
char n[80];
clrscr();
cout<<"Enter Paragraph: \n";
gets(n);
for(i=0,x=1,y=23;i<=18;i++,y--)
{
gotoxy(x,y);
cprintf("%d",i);
}
for(i=0,x=3,y=23;i<=19;i++,y--)
{
gotoxy(x,y);
if(i==0)
cprintf("┴");
else if(i==19)
cprintf("▲ ");
else
cprintf("┤");
}
for(i=1,x=5,y=23;i<=26;i++,x=x+3)
{
if(i==1)
{
gotoxy(4,y);
cprintf("─");
}
gotoxy(x,y);
if(i==26)
cprintf("╜",i);
else
cprintf("╨───",i);
gotoxy(x,y+1);
cprintf("%c",(char)(i+64));
}
for(i=1,z=97,x=65,y=22,s=5,o=0;i<=26;i++,z++,x++,y=22,s=s+3,o=0)
{
for(q=0;n[q]!='\0';q++)
{
if(n[q]==x || n[q]==z)
{
gotoxy(s,y);
cprintf("║");
y=y-1;
o=1;
}
}
if(o==1)
{
gotoxy(s,y+1);
cprintf("╦");
}
}
getch();
}
===========================================================================
No comments:
Post a Comment