Created
December 8, 2017 02:52
-
-
Save ryu1-1uyr/5364999212fa76871db997650226cd93 to your computer and use it in GitHub Desktop.
selection => perl bmiChecker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/use/bin/perl | |
use warnings; | |
use strict; | |
use 5.010; | |
say "体重どうぞ"; | |
my $omosa = <STDIN>; | |
say "身長どうぞ(mでどうぞ)"; | |
my $nagasa = <STDIN>; | |
my $BMI = $omosa / ($nagasa * $nagasa); | |
say"$BMI"; | |
if($BMI < 18.5){ | |
say"やせすぎぃ"; | |
}elsif($BMI <25){ | |
say"ふつう"; | |
}elsif($BMI <30){ | |
say"でぶ1"; | |
}elsif($BMI < 35){ | |
say"でぶ2"; | |
}elsif($BMI <40){ | |
say"でぶ3"; | |
}elsif($BMI >=40){ | |
say"くそでぶ"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment