Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- $szam1=<>;
- chomp($szam1);
- $szam2=<>;
- chomp($szam2);
- $szam3=<>;
- chomp($szam3);
- my @tomb;
- if($szam2 <= $szam3)
- {
- for($i=$szam2; $i<=$szam3; $i++)
- {
- push (@tomb, $i);
- }
- }
- else
- {
- for($i=$szam3; $i<=$szam2; $i++)
- {
- push (@tomb, $i);
- }
- }
- for($j=0; $j<=$#tomb; $j++)
- {
- if($tomb[$j] <= 9 && $tomb[$j] > -10)
- {
- print "$tomb[$j]"-"$szam1"."\n";
- }
- else
- {
- print "$tomb[$j]"+"$szam1"."\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement