UNA HERMOSA MOTO

UNA HERMOSA MOTO

miércoles, 22 de abril de 2015

Problema Propuesto 13



13.- DADO DOS NÚMEROS DETERMINAR SI SON IGUALES O DIFERENTES

Resultado de imagen para IGUALES O DIFERENTES

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package propuesto013;
import java.io.*;
/**
 *
 * @author abel montalvan
 */
public class Propuesto013 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException{
     int a,b;
      BufferedReader in=new BufferedReader(new  InputStreamReader(System.in));
 System.out.println("Número 1: ");
 a= Integer.parseInt(in.readLine());
 System.out.println("Número 2: ");
 b=Integer.parseInt(in.readLine());

     
       if(a==b)
       
     System.out.println("números son iguales");    

       else

     System.out.println("números son diferentes");
       
   
    }
}

No hay comentarios:

Publicar un comentario