UNA HERMOSA MOTO

UNA HERMOSA MOTO

miércoles, 22 de abril de 2015

Problema Propuesto 02


02.-¿CUÁNTOS NÚMEROS ENTEROS ESTÁN INCLUIDOS?

Resultado de imagen para NUMEROS ENTEROS INCLUIDOS

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package problema12;
import java.io.*;
/**
 *
 * @author ABEL MONTALVAN
 */
public class Problema12 {

    /**
     * @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));
      a=Integer.parseInt(in.readLine());
      b=Integer.parseInt(in.readLine());
      
      String x = Integer.toString(a);
      String y = Integer.toString(b);
      
      System.out.println("el 1er número ingresado tiene: " + x.length() + " dígitos");
      System.out.println("el 2do número ingresado tiene: " + y.length() + " dígitos");
        // TODO co de application logic here
    }
}

No hay comentarios:

Publicar un comentario