Okay, thank you again but I have a small problem. I'm trying to put a "-" between the words but having some trouble. Here's my code
Code:
#include <stdio.h>
#include <strings.h>
int main()
{
char number[255];
int n, digits, x=0, num_length;
printf("Enter a number: ");
scanf("%s", &number);
num_length = strlen(number);
for(n=0; n<=num_length; n++){
switch(number[n]){
case '0': printf("zero");
break;
case '1': printf("one");
break;
case '2': printf("two");
break;
case '3': printf("three");
break;
case '4': printf("four");
break;
case '5': printf("five");
break;
case '6': printf("six");
break;
case '7': printf("seven");
break;
case '8': printf("eight");
break;
case '9': printf("nine");
break;
}
for(x=0; x<=n; x++){
printf("-");
}
}
return 0;
}