10、 单位换算
【问题描述】
用C++程序将a分换算成b小时
输入a分钟 输出b小时
【样例输入】
90
【样例输出】
1.5h
【源代码】
#include<iostream>
using namespace std;
int main(){
int c1;
double ans;
cin>>c1;
ans = c1/60;
cout << ans <<"h"<< endl;
return 0;
}
用C++程序将a分换算成b小时
输入a分钟 输出b小时
90
1.5h
#include<iostream>
using namespace std;
int main(){
int c1;
double ans;
cin>>c1;
ans = c1/60;
cout << ans <<"h"<< endl;
return 0;
}