UNA HERMOSA MOTO

UNA HERMOSA MOTO

miércoles, 22 de abril de 2015

Problema Resuelto 13



13.- DETERMINAR SI UN CARACTER ES VOCAL



/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package problema013;

import java.util.Scanner;
/**
 *
 * @author ABEL MONTALVAN
 */
public class Problema013 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

        char c;
//String r="";
System.out.println("Caracter");
Scanner teclado=new Scanner(System.in);
c=teclado.next().charAt(0);
if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u'||c=='A'||c=='E'||c=='I'||c=='O'||c=='U'){
//r="es vocal";}
System.out.println("ES VOCAL");
} else{
//r="no es vocal"; }
System.out.println("NO ES VOCAL");

}//System.out.println("la letra ingresada "+r);
}
}

No hay comentarios:

Publicar un comentario