DELAY
#include <iostream.h>
#include <conio.h>
#include <string.h>
void delay(int a)
{ int x,y;
for(x=1;x<1200;x++)
{
for(y=1;y<1200;y++)
{cout<<"";
}
}
}
void main()
{ int a,i=1;
char Kal[50],select;
while(i!=0){
clrscr();
cout<<"insert the phrase: ";cin.getline(Kal,50);
a=strlen(Kal);
cout<<Kal; / / display the character before the motion
for(int j=0;j<a;j++) //string looping
{
for(int i=1;i<=15;i++) //motion looping
{
if(Kal[j]==' ')
continue;
gotoxy(j+1,1+i);
delay(10);
cout<<' ';
gotoxy(j+1,2+i);
cout<<Kal[j];
}
}
cout<<"\n\n if you want to get out ? (Y/N) ";select=getche();
if (select=='y'|| select=='Y')
i=0;
if (select=='n'|| select=='N')
i=1;
}
getch();
}
#include <conio.h>
#include <string.h>
void delay(int a)
{ int x,y;
for(x=1;x<1200;x++)
{
for(y=1;y<1200;y++)
{cout<<"";
}
}
}
void main()
{ int a,i=1;
char Kal[50],select;
while(i!=0){
clrscr();
cout<<"insert the phrase: ";cin.getline(Kal,50);
a=strlen(Kal);
cout<<Kal; / / display the character before the motion
for(int j=0;j<a;j++) //string looping
{
for(int i=1;i<=15;i++) //motion looping
{
if(Kal[j]==' ')
continue;
gotoxy(j+1,1+i);
delay(10);
cout<<' ';
gotoxy(j+1,2+i);
cout<<Kal[j];
}
}
cout<<"\n\n if you want to get out ? (Y/N) ";select=getche();
if (select=='y'|| select=='Y')
i=0;
if (select=='n'|| select=='N')
i=1;
}
getch();
}
good luck with my friends :)
Tidak ada komentar:
Posting Komentar