题意:输出1-99的英文字母

解题思路:哈哈

解题代码:

  1 // File Name: a.cpp
  2 // Author: darkdream
  3 // Created Time: 2015年04月15日 星期三 00时35分13秒
  4 
  5 #include<vector>
  6 #include<list>
  7 #include<map>
  8 #include<set>
  9 #include<deque>
 10 #include<stack>
 11 #include<bitset>
 12 #include<algorithm>
 13 #include<functional>
 14 #include<numeric>
 15 #include<utility>
 16 #include<sstream>
 17 #include<iostream>
 18 #include<iomanip>
 19 #include<cstdio>
 20 #include<cmath>
 21 #include<cstdlib>
 22 #include<cstring>
 23 #include<ctime>
 24 #define LL long long
 25 
 26 using namespace std;
 27 int n;
 28 char str[][100] = {
 29 "zero",
 30 "one",
 31 "two",
 32 "three",
 33 "four",
 34 "five",
 35 "six",
 36 "seven",
 37 "eight",
 38 "nine",
 39 "ten",
 40 "eleven",
 41 "twelve",
 42 "thirteen",
 43 "fourteen",
 44 "fifteen",
 45 "sixteen",
 46 "seventeen",
 47 "eighteen",
 48 "nineteen",
 49 "twenty",
 50 "twenty-one",
 51 "twenty-two",
 52 "twenty-three",
 53 "twenty-four",
 54 "twenty-five",
 55 "twenty-six",
 56 "twenty-seven",
 57 "twenty-eight",
 58 "twenty-nine",
 59 "thirty",
 60 "thirty-one",
 61 "thirty-two",
 62 "thirty-three",
 63 "thirty-four",
 64 "thirty-five",
 65 "thirty-six",
 66 "thirty-seven",
 67 "thirty-eight",
 68 "thirty-nine",
 69 "forty",
 70 "forty-one",
 71 "forty-two",
 72 "forty-three",
 73 "forty-four",
 74 "forty-five",
 75 "forty-six",
 76 "forty-seven",
 77 "forty-eight",
 78 "forty-nine",
 79 "fifty",
 80 "fifty-one",
 81 "fifty-two",
 82 "fifty-three",
 83 "fifty-four",
 84 "fifty-five",
 85 "fifty-six",
 86 "fifty-seven",
 87 "fifty-eight",
 88 "fifty-nine",
 89 "sixty",
 90 "sixty-one",
 91 "sixty-two",
 92 "sixty-three",
 93 "sixty-four",
 94 "sixty-five",
 95 "sixty-six",
 96 "sixty-seven",
 97 "sixty-eight",
 98 "sixty-nine",
 99 "seventy",
100 "seventy-one",
101 "seventy-two",
102 "seventy-three",
103 "seventy-four",
104 "seventy-five",
105 "seventy-six",
106 "seventy-seven",
107 "seventy-eight",
108 "seventy-nine",
109 "eighty",
110 "eighty-one",
111 "eighty-two",
112 "eighty-three",
113 "eighty-four",
114 "eighty-five",
115 "eighty-six",
116 "eighty-seven",
117 "eighty-eight",
118 "eighty-nine",
119 "ninety",
120 "ninety-one",
121 "ninety-two",
122 "ninety-three",
123 "ninety-four",
124 "ninety-five",
125 "ninety-six",
126 "ninety-seven",
127 "ninety-eight",
128 "ninety-nine"
129 }; 
130 int main(){
131     scanf("%d",&n);
132     puts(str[n]);
133     
134 return 0;
135 }
View Code

 

posted on 2015-04-15 16:09  dark_dream  阅读(192)  评论(0编辑  收藏  举报