1 条题解
-
0
C :
#include<stdio.h> main() {float F,c; scanf("%f",&F); c=5*(F-32)/9; printf("c=%.2f",c); }
C++ :
#include<stdio.h> main() { float a,c,F; scanf("%f",&a); F=a;c=5*(F-32)/9; printf("c=%.2f",c); }
Pascal :
var n:real; begin readln(n); write('c=',5*(n-32)/9:0:2); end.
Java :
import java.text.DecimalFormat; import java.util.Scanner; public class Main { private static Scanner s = new Scanner(System.in) ; private static DecimalFormat df = new DecimalFormat("0.00") ; public static void main(String[] args) { double F = s.nextDouble() ; double c = 5*((F-32)/9) ; System.out.println("c="+df.format(c)); } }
- 1
信息
- ID
- 1401
- 时间
- 1000ms
- 内存
- 64MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者