Created
December 19, 2015 04:23
-
-
Save tomcha/22df3a332c2b8c996f42 to your computer and use it in GitHub Desktop.
ouyou2
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my @numbers; | |
print "5つの数字を入力して下さい。\n"; | |
for my $i (1..5){ | |
print "$iつ目の数字>>>"; | |
my $num = <STDIN>; | |
chomp $num; | |
push @numbers, $num; | |
} | |
my @sorted_num = sort @numbers; | |
print "昇順に並べ替えた数字を出力します。\n"; | |
for my $j (@sorted_num){ | |
print "$j\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment