CODE
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
int i,j;
int flag=0;
char str[7];
char b[2][8];
char a[29][9]={
"zero","one","two","three","four", "five","six",
"seven","eight","nine","ten","eleven","twelve",
"thirteen","fourteen","fifteen","sixteen",
"seventeen","eighteen","nineteen","twenty",
"thirty","fourty","fifty","sixty","seventy",
"eighty","ninety","hundred"
} ;
void enter();
void split();
void compare();
int main()
{
clrscr();
enter();
split();
compare();
return 0;
}
void enter()
{
cout<<"enter any string";
for(i=0;i<7;i++)
{
cin>>str[i];
}
fflush(stdin);
}
void split()
{
i=0;
j=0;
again:
do
{
j=0;
b[i][j]=str[j];
j++;
}
while (str[j-1]!=32);
if(str[j]==32)
{
i=i+1;
goto again;
}
}
void compare()
{ i=0;
j=0;
do
{
if(a[i][j]==b[i][j])
flag=0;
else
flag=1;
j++;
}
while(a[i][j-1]!=32);
if(flag==0)
cout<<i;
}