CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* v2
Added "ten", though still can't
pass code coach, any ideas ?
*/
#include <iostream>
using namespace std;
int main() {
string n[11]={"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"}, ten;
char phrase[100] = {'\0'}, c;
int x = 0;
cin.getline(phrase,100);
for (x = 0; x < 100; x++)
{
c = phrase[x];
ten += c;
ten += phrase[x+1];
if (ten == "10")
{
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run