顶啊
桃花有意随流水而流水无心恋落花
#include<iostream>
using namespace std;
void time(int,int);
int main()
{
int a,b;
cout<<"Enter number of hours:";
cin>>a;
cout<<"Enter number of minutes:";
cin>>b;
time(a,b);
cin.get();
cin.get();
return 0;
}
void time(int hour,int minute)
{
cout<<"Time:"<<hour<<":";
if(minute<10)
cout<<"0"<<minute<<endl;
else
cout<<minute<<endl;
}
谢谢kisscjy!!!