Java Script
if (card > 21) {
document.write("busted");
} else if (card == 21) {
document.write("won");
} else {
document.write("continue");
}
|
Java
if (card > 21) {
System.out.println("busted");
} else if (card == 21) {
System.out.println("won");
} else {
System.out.println("continue");
}
|
PHP
if ($card > 21) {
echo "busted";
} else if ($card == "21") {
echo "won";
} else {
echo "continue";
}
|
Perl
if ($card > 21) {
print "busted";
} elseif ($card == 21) {
print "won";
} else {
print "continue";
}
|
Python
if card > 21:
print "busted"
elif card == 21:
print "won"
else:
print "continue"
|
C, C++
if (card > 21) {
printf("busted");
} else if (card == 21) {
printf("won");
} else {
printf("continue");
}
|
C#
if (card > 21) {
Console.WriteLine("busted");
else if (card == 21) {
Concole.WriteLine("won");
} else {
Console.WriteLine("continue");
}
|
Bash
if test "$card" -gt "21"; then
echo "busted"
elif test "$card" -eq "21"; then
echo "won"
else
echo "continue"
fi
|
Pascal
if card > 21 then
writeln("busted");
else if card = 21 then
writeln("won");
else
writeln("continue");
|
XSLT
<xls:choose>
<xsl:when test="@card > 21">
busted
</xsl>
<xsl:when test="@card == 21">
won
</xsl>
<xsl:otherwise">
continue
</xsl>
</xsl:choose>
|
Excel
=IF(A1>21;"busted";IF(A1=21;"won";"continue"))
|
Ruby
if card > 21
print "busted"
elseif card == 21
print "won"
else
print "continue"
end
|
Objective-C
please contribute
|
|
ASM
please contribute
|
Basic
please contribute
|