@vncpetrov/

NumberToText

C++

No description

fork
loading
Files
  • main.cpp

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.6870688370550277","path":"main.cpp","file":{"path":"main.cpp","content":{"asEncoding":{"base64":"I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAgaW50IG51bTsKICBjaW4gPj4gbnVtOwoKICBpZiAobnVtID09IDEpIHsKICAgIGNvdXQgPDwgIm9uZSIgPDwgZW5kbDsKICB9CiAgZWxzZSBpZiAobnVtID09IDIpIHsKICAgIGNvdXQgPDwgInR3byIgPDwgZW5kbDsKICB9CiAgZWxzZSBpZiAo4oCmKSAgewogICAgLy8gVE9ETwogIH0gCiAgZWxzZSBpZiAobnVtID09IDkpICB7CiAgICBjb3V0IDw8ICJuaW5lIiA8PCBlbmRsOwogIH0gCiAgZWxzZSAgewogICAgY291dCA8PCAibnVtYmVyIHRvbyBiaWciIDw8IGVuZGw7CiAgfSAKfQ=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
using namespace std;

int main() {
  int num;
  cin >> num;

  if (num == 1) {
    cout << "one" << endl;
  }
  else if (num == 2) {
    cout << "two" << endl;
  }
  else if (…)  {
    // TODO
  } 
  else if (num == 9)  {
    cout << "nine" << endl;
  } 
  else  {
    cout << "number too big" << endl;
  } 
}