java-dbr
  Con edad y peso indicar estado de la persona
 
import java.util.*;
public class pesoyedad{
public static void main (String[] args){
int one,two;
String three;
 
Scanner teclado = new Scanner (System.in);
System.out.print("Edad: ");
one = teclado.nextInt();
System.out.print("Peso: ");
two = teclado.nextInt();
 
 
three= prom(one,two);
System.out.println(three);
}
 
public static String  prom (int a,int b){
if (a<=30){
    if(b<=55){
        return "JOVENYFLACO";
}
    else {
        return "JOVENYGORDO";
    }
}
else {
    if(b<=55){
        return "VIEJOYFLACO";
}
    else {
        return "VIEJOYGORDO";
    }
   }
 
  Hoy habia 17 visitantes (24 clics a subpáginas) ¡Aqui en esta página!  
 
Este sitio web fue creado de forma gratuita con PaginaWebGratis.es. ¿Quieres también tu sitio web propio?
Registrarse gratis