To write a program which uses the functions Window(), Textcolor(), Textbackground(), Cputs(), and gotoxy() for printing the word PAKISTAN follow the following commands.
#include<conio.h>
#include<stdio.h>
#include<dosh.h>
void main(void)
{
clrscr();
int i,k,b;
textbackground(0);
clrscr():
window(20,6,59,24);
for (i=0;i<10;i++)
{
textbackground(i);
clrscr();
for(k=1;k>1;k–)
{
gotoxy(45,12);
textcolor(k);
cputs(“PAKISTAN”);
sleep(1);
}
}
sleep(1);
}
August 26, 2011