Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main{
- public static void main(String[] args){
- int num;
- Scanner reader = new Scanner(System.in);
- System.out.print("Escribe una cifra ");
- num= reader.nextInt();
- if( num < 0)
- System.out.println("El valor es negativo");
- else
- System.out.println("El valor es positivo");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment