#include<iostream.h>
#include<graphics.h>
#include<dos.h>
#include<conio.h>
void main()
{
int gd=DETECT,gm;
clrscr();
initgraph(&gd,&gm,"C:\\tc\\bgi");
setbkcolor(BLUE);
setcolor(WHITE);
int i,n;
int x=10;
char a[20][20];
cout<<"\n\t\t Letter by Letter(News headlines)";
cout<<"\n\t\t ********************************";
cout<<"\n\t Enter the number of letters\n";
cin>>n;
cout<<"\n\tEnter the news\n";
for(i=0;i<n;i++)
cin>>a[i];
while(!kbhit())
{
cleardevice();
settextstyle(3,0,4);
for(i=0;i<n;i++)
{
outtextxy((x+i)*20,200,a[i]);
delay(250);
}
}
getch();
}
No comments:
Post a Comment
Thank you for using this blog.