WKYNEKO

博客园 首页 新随笔 联系 订阅 管理

/*
//c1 c2 c3 c4 c5分别为China不输入转变为Glmre
#include<iostream>
using namespace std;
int main()
{
char c1 = 'C';
char c2 = 'h';
char c3 = 'i';
char c4 = 'n';
char c5 = 'a';
char a, b, c, d, e;
a = c1 + 4;
b = c2 + 4;
c = c3 + 4;
d = c4 + 4;
e = c5 + 4;
cout << a << b << c << d << e << endl;
return 0;
}
*/


/*
//输入华氏度输出摄氏度(C=5/9*(F-32))
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
float F, C;
cin >> F;
C = 5 * (F - 32) / 9;
cout << fixed << setprecision(0) << C << endl; //开头#include<iomanip>结尾cout << fixed << setprecision(0) << C 指输出0位小数的C
return 0;
}
*/

 

/*
//1000元按年利息r存一年,拿出后本息一起存,重复n年,求n年后本息
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
double n, r, P;
cin >> n >> r;
P=1000*pow(1+r,n);
cout << P << endl;
return 0;
}
*/

 

/*
//输入三个数比较然后小到大输出
#include<iostream>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
if (a >= b&&a >= c&&b >= c)
cout << c << ' ' << b << ' ' << a << endl;

if (b >= a&&b >= c&&a >= c)
cout << c << ' ' << a << ' ' << b << endl;

if (c >= a&&c >= b&&a >= b)
cout << b << ' ' << a << ' ' << c << endl;

if (a >= c&&a >= b&&c >= b)
cout << b << ' ' << c << ' ' << a << endl;

if (c >= b&&c >= a&&b >= a)
cout << a << ' ' << b << ' ' << c << endl;

if (b >= c&&b >= a&&c >= a)
cout << a << ' ' << c << ' ' << b << endl;

if(a==b&&b==c)
cout << a << ' ' << b << ' ' << c << endl;

if(a==b&&a>c)
cout << c << ' ' << b << ' ' << a << endl;

if(a==b&&c>a)
cout << a << ' ' << b << ' ' << c << endl;

if(b==c&&a>b)
cout << c << ' ' << b << ' ' << a << endl;

if(b==c&&b>a)
cout << a << ' ' << b << ' ' << c << endl;

if(a==c&&a>b)
cout << b << ' ' << c << ' ' << a << endl;

if(a==c&&b>a)
cout << a << ' ' << c << ' ' << b << endl;

return 0;
}
*/

 


/*
//第二种
#include <iostream>
using namespace std;
int main()
{
float a, b, c, t;
cin >> a >> b >> c;
if (a>b)
{
t = a;
a = b;
b = t;
}
if (a>c)
{
t = a;
a = c;
c = t;
}
if (b>c)
{
t = b;
b = c;
c = t;
}
cout << a << " " << b << " " << c << endl;
return 0;
}
*/

posted on 2023-03-21 22:35  BKYNEKO  阅读(9)  评论(1编辑  收藏  举报