Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. package javaapplication3;
  2. import javax.swing.JOptionPane;
  3.  
  4. public class JavaApplication3 {
  5.  
  6.  
  7. public static void main(String[] args) {
  8. double z,x,c,f;
  9. c = Integer.parseInt(JOptionPane.showInputDialog("digite su IMC"));
  10.  
  11.  
  12. if (c<16) {
  13. System.out.println("Criterio de ingreso a hospital");
  14.  
  15. }
  16. if (c==16&&c==17) {
  17. System.out.println("Usted tiene infrapeso");
  18.  
  19. }
  20. if (c==18) {
  21. System.out.println("bajo de peso");
  22.  
  23. }
  24. if (c>=19&&c<=25) {
  25. System.out.println("peso normal (saludable)");
  26.  
  27. }
  28. if (c>=26&&c<=30) {
  29. System.out.println("Sobrepeso(obesidad grado I)");
  30.  
  31. }
  32. if (c>=31&&c<=35) {
  33. System.out.println("Sobrepeso cronico(obesidad grado II)");
  34.  
  35. }
  36. if (c>=36&&c<=39) {
  37. System.out.println("obesidad premorbida (obesidad grado III)");
  38.  
  39. }
  40. if (c>=40) {
  41. System.out.println("Obesidad morbida(obesidad grado IV)");
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement