PariDispari

This commit is contained in:
Raffaele Mignone 2016-10-05 16:17:52 +02:00
parent 6c6638ca6e
commit 1c059137ed
2 changed files with 12 additions and 0 deletions

BIN
PariDispari.class Normal file

Binary file not shown.

12
PariDispari.java Normal file
View File

@ -0,0 +1,12 @@
import java.util.Scanner;
public class PariDispari{
public static void main(String[] arg){
System.out.print("Inserisci un numero: ");
Scanner s = new Scanner(System.in);
int value=s.nextInt();
if(value%2==0)
System.out.println("Pari");
else
System.out.println("Dispari");
}
}