猫史档案馆


【c++一本通代码公布】1007-1015

用户:程序员李某_com程序员李某_com查看:0 回复:0 评论:0 创建时间:2021-05-05T13:14:54


我又来公布代码了!话不多说,直接上代码!

1007:

#include <iostream>
 
using namespace std;

int main()
{
	int a,b,c;
	cin >> a >> b >> c ;
    cout<< (a+b)*c ;
	
	return 0;
	}

1008:

#include <iostream>
 
using namespace std;

int main()
{
	int a,b,c;
	cin >> a >> b >> c ;
    cout<< (a+b)/c ;
	
	return 0;
	}

1009:

#include <iostream>
 
using namespace std;

int main()
{
	int a,b;
	cin >> a >> b  ;
	cout << a/b ;
	cout <<  ' ';
	cout << a%b ;
	
	return 0;
}

1010:

#include <bits/stdc++.h>
using namespace std;
int main(){
	double a,b;
	cin>>a>>b;
	printf("%0.9lf",a/b) ;
	return 0;
}

1011:

#include <bits/stdc++.h>


 
using namespace std;

int main()
{
	double a,b,c;
	cin >> a >>b ;
	c = b*100/a;
	printf("%0.3lf",c) ;
	cout << '%';
    
	
	return 0;
	}

1012:

#include <bits/stdc++.h>
using namespace std;
int main(){
	double x,a,b,c,d;
	double ax,bx,cx;
	cin>>x>>a>>b>>c>>d;
	ax=a*x*x*x;
	bx=b*x*x;
	cx=c*x;
	printf("%0.7lf",ax+bx+cx+d);
	return 0;
}

1013:

#include <bits/stdc++.h>
using namespace std;
int main(){
	double f;
	cin>>f;
	printf("%.5lf",5*(f-32)/9);
	return 0;
}

1014:

#include<bits/stdc++.h>
using namespace std;
int main(){
	double a,s,d,f;
	cin>>a;
	s = a*2;
	d = 2*3.14*a;
	f = a*a*3.14;
	printf("%.4lf",a*2.0000);
	cout<<" "; 
	printf("%.4lf",2.000*3.14159*a);
	cout<<" ";
	printf("%.4lf",a*a*3.14159);
	return 0;
}

1015:

#include <bits/stdc++.h>
using namespace std;
int main(){
	double r1,r2;
	cin>>r1>>r2;
	printf("%.2lf",1/((1/r1)+(1/r2)));
	return 0;
}

更多代码敬请期待!


回复

上一页1 页 / 共 0下一页