/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static double leerDouble( Scanner reader) {
return reader.nextDouble();
}
static double resta(double n, double m){
return (n - m); }
static double suma(double n, double m){
return (n + m); }
static double multiplica(double n, double m){
return (n * m); }
static double cuadrado(double n){
return (n * n); }
{
Scanner lectura
= new Scanner
(System.
in); double x = leerDouble(lectura);
double y = leerDouble(lectura);
//operaciones:
System.
out.
println("resta: " + resta
(x, y
)); System.
out.
println("suma: " + suma
(x, y
)); System.
out.
println("multiplica: " + multiplica
(x, y
)); System.
out.
println("cuadrado: " + cuadrado
(x
));
} // end main
} // end class
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgZG91YmxlIGxlZXJEb3VibGUoIFNjYW5uZXIgcmVhZGVyKSB7CiAgICAgICAgcmV0dXJuIHJlYWRlci5uZXh0RG91YmxlKCk7Cn0Kc3RhdGljIGRvdWJsZSByZXN0YShkb3VibGUgbiwgZG91YmxlIG0pewoJCQlyZXR1cm4gKG4gLSBtKTsgfQogCgkJc3RhdGljIGRvdWJsZSBzdW1hKGRvdWJsZSBuLCBkb3VibGUgbSl7CgkJcmV0dXJuIChuICsgbSk7IH0KIAoJCXN0YXRpYyBkb3VibGUgbXVsdGlwbGljYShkb3VibGUgbiwgZG91YmxlIG0pewoJCQlyZXR1cm4gKG4gKiBtKTsgfQogCgkJc3RhdGljIGRvdWJsZSBjdWFkcmFkbyhkb3VibGUgbil7CgkJcmV0dXJu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