0% found this document useful (0 votes)
17 views1 page

Es 20

The code defines a Java class with a main method that gets a double number from the user, checks if it is between 3 and 5, and prints a message if it is not valid.

Uploaded by

Jeanin Sorescu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

Es 20

The code defines a Java class with a main method that gets a double number from the user, checks if it is between 3 and 5, and prints a message if it is not valid.

Uploaded by

Jeanin Sorescu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

import java.util.

Scanner;
public class Es20 {

public static void main (String[] args) {


Scanner in = new Scanner(System.in);
System.out.println("Inserisci un numero: ");
double x = in.nextDouble();

if (x>3 && x<5)

else
System.out.println("Valore inserito non valido");

}
}

You might also like