Skip to content

Instantly share code, notes, and snippets.

@ryu1-1uyr
Created December 8, 2017 02:52
Show Gist options
  • Save ryu1-1uyr/5364999212fa76871db997650226cd93 to your computer and use it in GitHub Desktop.
Save ryu1-1uyr/5364999212fa76871db997650226cd93 to your computer and use it in GitHub Desktop.
selection => perl bmiChecker
#!/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