fortuneman
Technical User
Can someone tell me what the following line is saying? or logically doing? Thanks.
print($number&1<<$c?'+':'-');
print($number&1<<$c?'+':'-');
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
if($number & 1 << $c) {
print '+';
} else {
print '-';
}
# output a "+" if..., and a "-" if...
print($number&1<<$c?'+':'-');
# $result is $a if $cond, or $b otherwise
my $result = $cond ? $a : $b;
# $result is $a if $cond, or $b otherwise
my $result;
if ($cond)
{
$result = $a;
}
else
{
$result = $b;
}