You are on page 1of 1

/* Online Java Compiler and Editor */

import java.util.Scanner;

public class HelloWorld{

public static void main(String []args){


double x, y, z;
Scanner tastiera = new Scanner(System.in);

System.out.println("Digita un numero con virgola");


x = tastiera.nextDouble();
y = 1.0/x;
z = x*y - x;
System.out.println("hai digitato " + x);
System.out.println("y = " + y);
System.out.println("L'operazione ha come risultato " + z);
}
}

You might also like