#!/usr/bin/perl print "Enter a number\n"; chomp($a=<stdin>); print "Enter second number\n"; chomp($b=<stdin>); print "Enter third number\n"; chomp($c=<stdin>); $big=0; $equal=0; if($a == $b){ $big = $a; $equal = $a; } elsif($a > $b){ $big=$a; } else{ $big = $b; } if($equal == $c){ print "All numbers are same"; } elsif($big < $c){ $big = $c; print "The biggest number is $big \n"; }
In reply to Re^2: Find the biggest number from three numbers
by shrsv
in thread Find the biggest number from three numbers
by shrsv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |