Code:
#include<iostream>
#include<conio.h>
using std::cout;
using std::cin;
using std::endl;
// function prototype
void showTimeH( int );
void showTimeM( int );
int main()
{
// declare variable
int hours, minutes, seconds;
// read time in format h/m/s
cout<< "What is the time now:(h/m/s)";
cin>> hours >> minutes >> seconds;
// show time in seconds
// call functions showTimeH() % showTimeM()
cout<< "Hours " << "Minutes " << "Seconds" <<endl;
cout<< showTimeH( hours ) << "-" << showTimeM( minutes ) << "-"<< seconds;
getch();
}
// function definition
void showTimeH( int hValue )
{
cout<< hValue*60;
}
void showTimeM( int mValue )
{
cout<< mValue*60;
}
The functions showTimeH( hours )
&
showTimeM( minutes )
donot work? They should give hours*60 = ........ seconds and minutes*60=........seconds?
respectively
?