Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  This program prints in time
Language: C/C++
Code:
#include<iostream>
using namespace std;

int length(string a){
                     int c=0;
                     while (a[c]!= '\0' )
                                         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]!='\0'){
                                                              twait(chtm);
                                                              cout<<toDis[ch];
                                                              ch++;
                                       }
}

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