I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
Index » Programming » C/C++ »

blacksnake\′s Photo
25 Feb 07, 9:40PM
{
int hrs, mins, rem, x;
 
//input number of hours
 
x=hrs*60;//multiply hours by 60
rem=mins+x;//add the number of minutes
cout<<"the time is<<rem<<"minutes";
}

we just used borland version of C++...the algorithm is actually a number of hours and minutes...e.g. 12:30...first 12(the number of hours) multiply by 60 then add the number of minutes such as 30...the result shouldbe 750...

in this case it is much simplier for you...just try it

Currently you need to be logged in to leave a message.