//Sometimes we Want to Print our Name or any Statement on Screen word by Word
#include <iostream>
#include <conio.h>
#include <string>
using namespace std;
void mydelay(int sec); //Declaring Delay Function
//sec will b parameter
void mydelay(int sec) // Defining Delay Function
{
int w,e;
for(w=0; w<sec; w++) // Making Nested Loop for More Time Consuming
{
for(e=0; e<1000000; e++) // 1000000 for making time(printing) speed slow
{
}
}
}
int main() // for Turbo Cplus plus write "void main( )"
{
char name[] = "My Name is Matee ur Rehman....";
char web[] = "www.gcuftimes.blogspot.com";
int t=0;
int get = strlen(name); // taking Length of String using "strlen( )" function
int ln=strlen(web);
cout << endl;
cout<<"\n\t";
while(t!=get)
{
mydelay(35);
cout << name[t];
t++;
}
cout<<"\n\t";
int i=0;
while(i!=ln)
{
mydelay(20); // 20 will be passed to sec variable
cout << web[i];
i++;
}
cout<<endl;
cin.get();
system("pause");
}
// for implementing it in T.C remove 4th and last line
// THANX
// Matee ur Rehman
#include <iostream>
#include <conio.h>
#include <string>
using namespace std;
void mydelay(int sec); //Declaring Delay Function
//sec will b parameter
void mydelay(int sec) // Defining Delay Function
{
int w,e;
for(w=0; w<sec; w++) // Making Nested Loop for More Time Consuming
{
for(e=0; e<1000000; e++) // 1000000 for making time(printing) speed slow
{
}
}
}
int main() // for Turbo Cplus plus write "void main( )"
{
char name[] = "My Name is Matee ur Rehman....";
char web[] = "www.gcuftimes.blogspot.com";
int t=0;
int get = strlen(name); // taking Length of String using "strlen( )" function
int ln=strlen(web);
cout << endl;
cout<<"\n\t";
while(t!=get)
{
mydelay(35);
cout << name[t];
t++;
}
cout<<"\n\t";
int i=0;
while(i!=ln)
{
mydelay(20); // 20 will be passed to sec variable
cout << web[i];
i++;
}
cout<<endl;
cin.get();
system("pause");
}
// for implementing it in T.C remove 4th and last line
// THANX
// Matee ur Rehman
0 comments: