Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javaapplication3;
- import javax.swing.JOptionPane;
- public class JavaApplication3 {
- public static void main(String[] args) {
- double z,x,c,f;
- c = Integer.parseInt(JOptionPane.showInputDialog("digite su IMC"));
- if (c<16) {
- System.out.println("Criterio de ingreso a hospital");
- }
- if (c==16&&c==17) {
- System.out.println("Usted tiene infrapeso");
- }
- if (c==18) {
- System.out.println("bajo de peso");
- }
- if (c>=19&&c<=25) {
- System.out.println("peso normal (saludable)");
- }
- if (c>=26&&c<=30) {
- System.out.println("Sobrepeso(obesidad grado I)");
- }
- if (c>=31&&c<=35) {
- System.out.println("Sobrepeso cronico(obesidad grado II)");
- }
- if (c>=36&&c<=39) {
- System.out.println("obesidad premorbida (obesidad grado III)");
- }
- if (c>=40) {
- System.out.println("Obesidad morbida(obesidad grado IV)");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement