10、C++单位换算

                                               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;
}

猜你喜欢

转载自blog.csdn.net/chengjunming123/article/details/81098511