![]() |
#2
玩出来的代码2010-11-25 14:19
|
#include <iostream>
using namespace std;
void time(int);
int main()
{
int hours,minutes;
cout<<"enter the number of hours : ";
cin>>hours;
cout<<endl;
cout<<"enter the number of minutes : ";
cin>>minutes;
cout<<endl;
time(hours),time(minutes);
system("pause");
return 0;
}
void time(int sys)
{
cout<<"time: "<<sys<<endl;
}
本来是最后生成time: 9:28但是我这个却生成了time: 9 time : 28请各位给看看,不要笑我才学的,