Hey guys...
I want to write a program that transforms numbers into letters and letters into numbers...
for example 20 would be transformed into twenty
I have this but I don't know what's missing or what's the problem... help please
#include <iostream>
#include <string>
using namespace std;
using std::string;
void ones(string);
int main(){
int number;
cout<<"ENter:"<<endl;
cin>>number;
switch(number.length())
{
case 1: ones(number);
}
system("pause");
return 0;
}
void ones(int numero)
{
int x;
x=atoi (numero);
switch(x)
{
case 1: cout<<"one"<<endl;
case 2: cout<<"two"<<endl;
case 3: cout<<"three"<<endl;
case 4: cout<<"four"<<endl;
case 5: cout<<"five"<<endl;
case 6: cout<<"six"<<endl;
case 7: cout<<"seven"<<endl;
case 8: cout<<"eight"<<endl;
case 9: cout<<"nine"<<endl;
case 0: cout<<"zero"<<endl;
}
}