1 条题解

  • 0
    @ 2023-3-13 11:07:16

    C :

    #include<stdio.h>
    int main(){
    	double f,c1;
    	int c;
    	scanf("%d",&c);
    	c1=(double)c;
    	double k=9.0/5.0;
    	f=k*c+32;
    	printf("%.2f",f);
    	return 0;
    }
    

    C++ :

    #include<iostream>
    #include<iomanip>
    using namespace std;
    int main(){
    	int c;
    	cin>>c;
    	double f=9.0/5*c+32;
    	
    	
    	cout<<setiosflags(ios::fixed)<<setprecision(2)<<f<<endl;
    
    }
    

    Python :

    c=int(input())
    f=9/5*c+32
    print('%.2f'% f)
    
    • 1

    信息

    ID
    1287
    时间
    1000ms
    内存
    16MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者