Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javaapplication1;
- import java.util.Scanner;
- public class JavaApplication1 {
- public static void main(String[] args) {
- Scanner sc=new Scanner (System.in);
- int contador=1;
- while (contador<=10) {
- System.out.println("ingrese un numero");
- int num=sc.nextInt();
- if (num==0 || num<0){
- System.out.println("ingrese numero mayor a cero");
- if (num%2==0){
- System.out.println(num + " es par ");
- }
- else {
- System.out.println(num + " es impar ");
- }
- contador++;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement