This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let t=Int(readLine()!)! | |
| let a=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","forteen","fifteen","sixteen","seventeen","eighteen","nineteen"] | |
| let b=["twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"] | |
| if (t<20){print(a[t])} else if(t<100){print(b[t/10-2]+" "+a[t%10])} else if(t<1000){ | |
| let p=(t%100)/10 | |
| if (p<2){print(a[t/100]+" hundred "+a[t%20])} else {print(a[t/100]+" hundred "+b[p-2]+" "+a[t%10])}} | |
| Befunge: | |
| &&+.@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # file: rfcomm-client.py | |
| # auth: Albert Huang <albert@csail.mit.edu> | |
| # desc: simple demonstration of a client application that uses RFCOMM sockets | |
| # intended for use with rfcomm-server | |
| # | |
| # $Id: rfcomm-client.py 424 2006-08-24 03:35:54Z albert $ | |
| from bluetooth import * | |
| import sys | |
| import random |