Created
November 7, 2014 11:49
-
-
Save tomcha/46d8addb4b5285b0bd3d to your computer and use it in GitHub Desktop.
Perl入学式 標準入力の練習問題解答例
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; | |
use Data::Dumper; | |
print "1つ目の数字を入力して下さい >>"; | |
my $i = <STDIN>; | |
chomp $i; | |
print "2つ目の数字を入力して下さい >>"; | |
my $j = <STDIN>; | |
chomp $j; | |
print "$i + $j = ".($i + $j)." \n"; | |
print "$i - $j = ".($i - $j)." \n"; | |
print "$i * $j = ".($i * $j)." \n"; | |
print "$i / $j = ".($i / $j)." \n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment