Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  2
Language: C/C++
Code:

#include<iostream> 
using namespace std; 
    
void twait(double tm){
                      double start=clock();
                      while(clock()-start<tm){
                      }
}
int length(string a){ 
                     int c=0; 
                     while (a[c]!= '' ) 
                                         c++; 
                     return c; 

     
void tdisplay(double tm, string toDis){ 
                                       int ch=0; 
                                       double chtm=tm/length(toDis); 
                                       if(tm<length(toDis)) 
                                                           chtm=1; 
                                       while(toDis[ch]!=''){ 
                                                              twait(chtm); 
                                                              cout<<toDis[ch]; 
                                                              ch++; 
                                       } 


int main(){ 
     cout<<"nTime: "; 
     double t; 
     cin>>t; 
     tdisplay(t, "nSTAMPATO COLLA FUNSIONE MIA DI MEn"); 
     system("pause"); 
     main();      
}
          
          
          
Comments: