UNA HERMOSA MOTO

UNA HERMOSA MOTO

miércoles, 22 de abril de 2015

Problema Resuelto 14



14.-MULTIPLO DE 3 Y 5

Resultado de imagen para MULTIPLO DE 3 Y 5Resultado de imagen para MULTIPLO DE 3 Y 5

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

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        
    int n;
    String r;
 BufferedReader in=new BufferedReader(new  InputStreamReader(System.in));
 System.out.println("Numero: ");
 n=Integer.parseInt(in.readLine());
 if(n%3==0 && n%5==0)
 {
 r="SÍ ES MÚLTIPLO DE 3 Y 5";
 }
else
 {
 r="NO ES MÚLTIPLO DE 3 Y 5";
 }
 System.out.println("");
 System.out.println("Resultado:" + r);
 System.out.println();
  }
}
        
        

No hay comentarios:

Publicar un comentario