Determine card   #


<html> <head> </head> <body> <script> var types = ["clubs", "diamonds", "hearts", "spades"]; var values = ["ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "jack", "queen", "king"]; var num = 52; var tempnum = num; document.write(num + "<br>"); if (num <= 13) { document.write(types[0], values[num - 1]); } else if (num > 13 && num <= 26) { tempnum = tempnum - 13; document.write(types[1], values[tempnum - 1]); tempnum = num; } else if (num > 26 && num <= 39) { tempnum = tempnum - 26; document.write(types[2], values[tempnum - 1]); tempnum = num; } else { tempnum = tempnum - 39; document.write(types[3], values[tempnum - 1]); tempnum = num; } </script> </body> <html>

Loading Please Wait...