cpp_primer_plus/ch02/07.cpp

18 lines
314 B
C++
Raw Normal View History

2022-08-24 01:47:13 +08:00
# include <iostream>
using namespace std;
void time_output(int h, int m);
int main(){
int h, m;
cout << "Enter the number of hours: ";
cin >> h;
cout << "Enter the number of minutes: ";
cin >> m;
time_output(h,m);
return 0;
}
void time_output(int h, int m){
cout << "Time: " << h << ":" <<m << endl;
}