当年斩钉截铁说的不考研呢?

快哭了略忧伤,身边的人说好了一块学好技术好好找工作的,现在都转方向考研。。。西哒哒

昨天写的 没来得及敲 其实你就是爱以后不要找借口

2.7.6 

#include<iostream>
using namespace std;
double light(double n);
int main()
{
	double n,m;
	cout<<"Enter the number of light years:";
	cin>>n;
	m=light(n);
	cout<<n<<" light years = "<<m<<" astronomical units."<<endl;
	return 0;
}
double light(double n)
{
	return n*63240;
}

2.7.7

#include<iostream>
using namespace std;
void timeshow(double n,double m);
int main()
{
	double n,m;
	cout<<"Enter the number of hours:";
	cin>>n;
	cout<<"Enter the number of minutes:";
	cin>>m;
	timeshow(n,m);
}
void timeshow(double n,double m)
{
	cout<<"Time: "<<n<<":"<<m<<endl;
}

3,7.1

#include<iostream>//<span style="color:#ff0000;">怎么使用下划线来指示输入位置</span>
using namespace std;
const int inchi=12;
int main()
{
	double n;
	cout<<"Enter your tall inch: _";
	cin>>n;
	cout<<"your tall inchi is: "<<n*inchi<<endl;
	return 0;
}
3.7.2

#include<iostream>
using namespace std;
const double meter=0.0254;
const double kilograme=2.2;
int main()
{
	double n,m,b;
	cout<<"Enter your tall inchi: ";
	cin>>n;
	cout<<"Enter your tall inch: ";
	cin>>m;
	cout<<"Enter your body bones: ";
	cin>>b;
	double tall=(n*12+m)*meter;
	double grame=b/kilograme;
	double BMI=grame/(tall*tall);
	cout<<"BMI指数是"<<BMI<<endl;
	return 0;
}
 

以后是不是写代码的时候要带上一本英语词典!?词汇量也太少了,真是醉了。。。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值