ejemplo 512= quinientos doce
el programa tiene que aceptar como maximo hasta 7 digitos
1,000,000 = un millon
creo tener la idea pero aun sigo perdido :S, si me pueden ayudar :(
Código PHP:
#include <stdio.h>
#include <stdlib.h>
typedef struct
{
char unidad[0] = "cero ";
char unidad[1] = "uno ";
char unidad[2] = "dos ";
char unidad[3] = "tres ";
char unidad[4] = "cuatro ";
char unidad[5] = "cinco ";
char unidad[6] = "seis ";
char unidad[7] = "siete ";
char unidad[8] = "ocho ";
char unidad[9] = "nueve ";
char quinces[1] = "once ";
char quinces[2] = "doce ";
char quinces[3] = "trece ";
char quinces[4] = "catorce ";
char quinces[5] = "quince ";
char decena[1] = "deci ";
char decena[2] = "veinti ";
char decena[3] = "treinta ";
char decena[4] = "cuarenta ";
char decena[5] = "cincuenta ";
char decena[6] = "sesenta ";
char decena[7] = "setenta ";
char decena[8] = "ochenta ";
char decena[9] = "noventa ";
char centena[1] = "cien ";
char centena[2] = "doscientos ";
char centena[3] = "trescientos ";
char centena[4] = "cuatrocientos ";
char centena[5] = "quinientos ";
char centena[6] = "seiscientos ";
char centena[7] = "setecientos ";
char centena[8] = "ochocientos ";
char centena[9] = "novecientos ";
char miles[1]= "mil" ;
char miles[2]= "dos mil":
char miles[3]= "tres mil";
char miles[4]= "cuatro mil";
char miles[5]= "cinco mil";
char miles[6]= "seis mil";
char miles[7]= "siete mil";
char miles[8]= "ocho mil";
char miles[9]= "nueve mil";
char decenamil[1]= "dies mil";
char decenamil[2]= "veinte mil";
char decenamil[3]= "treinta mil";
char decenamil[4]= "cuarenta mil";
char decenamil[5]= "cincuenta mil";
char decenamil[6]= "sesenta mil";
char decenamil[7]]= "setenta mil";
char decenamil[8]= "ochenta mil";
char decenamil[9]= "noventa mil";
char centenamil[1]= "cien mil";
char centenamil[2]= "docientos mil";
char centenamil[3]= "tresientos mil";
char centenamil[4]= "cuatrosientos mil";
char centenamil[5]= "quientos mil";
char centenamil[6]= "seiscientos mil";
char centenamil[7]= "setecientos mil";
char centenamil[8]= "ochocientos mil";
char centenamil[9]= "novecientos mil";
char millar [1] ="un millon";
}TNum;
int main()
{
}