Java 代码
import java.util.Scanner;
public class Main
{
public static double add(double x, double y)
{
return x + y;
}
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
double m = cin.nextDouble();
double n = cin.nextDouble();
System.out.println (String.format("%.2f", add (m, n)));
}
}