0
unsigned long normalise(unsigned long input_time)
 {
 
     bool finished;
 
     // This produces a formatted time string like:
     // Thu_Nov_24_18:22:48_1986
     string str_time = format_time( input_time );
 
     while( str_time.substr(1,3) != "Sun")
     {
         input_time -= 24*60*60;
         str_time = format_time( input_time );
     }
 
     while( str_time.substr(11,2) != "00" )
     {
         input_time -= 60*60;
         str_time = format_time( input_time );
     }
 
     while( str_time.substr(14,2) != "00")
     {
         str_time = format_time( input_time );
         input_time -= 60;
     }
 
     while( str_time.substr(17,2) != "00")
     {
         input_time -= 1;
         str_time = format_time( input_time );
     }
 
     return input_time;
 }

Using any programming language of your choice, implement algorithms to:


a) Reverse a string

b) Sort an array of Integers

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Ancient Dragon
0

hey man i appreciate ur help n time , i realy do , but this is exactly how i got the question , sorry ...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.