首师大附中科创教育平台 我的刷题记录(2)

首师大附中科创教育平台我的刷题记录(给大家刷6--10题吧)

仅供同学们参考,禁止抄袭!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

#include<iostream>
using namespace std;
int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    double d;
    d=a+b+c;
    cout<<d/3<<endl;
    return 0;
}
求三个数的平均数
#include<iostream>
using namespace std;
int main()
{
    int a;
    cin>>a;
    cout<<-a<<endl;
    return 0;
}
相反数的问题
#include<iostream>
using namespace std;
int main()
{
    int a,b,c,d,e,f;
    cin>>a;
    b=a%10;
    c=a%100-b;
    d=c/10;
    e=a-a%100;
    f=e/100;
    cout<<b<<d<<f<<endl;
    return 0;
}
三位数倒序问题
#include<iostream>
using namespace std;
int main()
{
    int a;
    cin>>a; 
    cout<<5*a<<endl;
    return 0;
}
乘法问题
#include<iostream>
using namespace std;
int main()
{
    int a;
    cin>>a; 
    double b;
    b=a-32;
    cout<<b*5/9<<endl;
    return 0;
}
温度转换
原文地址:https://www.cnblogs.com/mayitao/p/5837354.html