3106:【例19.2】 判断身材
[例 19.2] 判断身材
#include<bits/stdc++.h>
using namespace std;
int main()
{
double ans,num;
cin>>ans>>num;
ans=(ans-100.00)*0.9;
if( num>ans*1.1 )
{
cout<<"fat"<<endl;
}
else
{
if( num<ans*0.9 )
{
cout<<"thin"<<endl;
}
else
{
cout<<"standard"<<endl;
}
}
return 0;
}
3107:【例19.3】 田忌赛马
[例 19.3] 田忌赛马
第21课 田忌赛马 《小学生C++趣味编程》
第21课 田忌赛马 《小学生C++趣味编程》_输入三个整数,表示三匹马跑完100米需要的秒数,时间越小速度越快。请按照快马、中-CSDN博客
#include<bits/stdc++.h>
using namespace std;
int main(){
double a[4];
cin>>a[1]>>a[2]>>a[3];
sort(a+1,a+4);
cout<<a[1]<<" "<<a[2]<<" "<<a[3];
return 0;
}
3108:练19.1 整数大小比较
练 19.1 整数大小比较
1043:整数大小比较
1043:整数大小比较-信息学奥赛一本通
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long x,y;
cin>>x>>y;
if( x>y )
{
cout<<">"<<endl;
}
else
{
if( x<y )
{
cout<<"<"<<endl;
}
else
{
cout<<"="<<endl;
}
}
return 0;
}
3109:练19.2 三个数
练 19.2 三个数
2053:【例3.3】三个数
C+2053三个数
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
int t;
if(a<b){
t=a;
a=b;
b=t;
}
if(a<c){
t=a;
a=c;
c=t;
}
if(b<c){
t=c;
c=b;
b=t;
}
cout<<a<<" "<<b<<" "<<c;
return 0;
}
3110:练19.3 比大小
练 19.3 比大小
第19课 比大小 《小学生C++趣味编程》
#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a*a>b*c){
cout<<"SQUARE";
}
else if(a*a<b*c){
cout<<"RECTANGLE";
}
else{
cout<<"SAME";
}
return 0;
}