kimimimi's Profile User Rating:

Reputation: -2 Dishonored
Group:
Members
Active Posts:
17 (0.02 per day)
Joined:
23-August 12
Profile Views:
1,579
Last Active:
Sep 24 2012 06:35 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0
kimimimi has not set their status

1. In Topic: my case study is converting words to number, vise versa..

Posted 26 Aug 2012

wooooooohooooo!!! i get it! thanks for the help guys! its now working
2. In Topic: my case study is converting words to number, vise versa..

Posted 26 Aug 2012

aww still, its not working!
3. In Topic: my case study is converting words to number, vise versa..

Posted 26 Aug 2012

hahaha! right! sorry that must be it! i put it in a wrong place btw thanks for your help!
4. In Topic: my case study is converting words to number, vise versa..

Posted 26 Aug 2012

```int num, temp, ten=0, tenthousand=0, tenmillion=0;
char ans='y';
while (ans=='y')
{

cout<<"Enter a number to convert (0-1000000000): ";
cin>>num;

cout<<"\n\n";
if(num==0)
cout<<"zero ";
else if(num>0&&num<=1000000000&&num!=0)
{
temp =(num/1000000000)*1000000000;
if(num!=0&&(temp%100000000)==0)
{
temp = num/100000000;
num = num-(temp*100000000);

if(temp==1)
{
if(num==0)
cout<<"one hundred million ";
else
cout<<"one hundred ";
}
else if(temp==2)
{
if(num==0)
cout<<"two hundred million";
else
cout<<"two hundred ";
}
else if(temp==3)
{
if(num==0)
cout<<"three hundred million ";
else
cout<<"three hundred ";
}
else if(temp==4)
{
if(num==0)
cout<<"four hundred million ";
else
cout<<"four hundred ";
}
else if(temp==5)
{
if(num==0)
cout<<"five hundred million ";
else
cout<<"five hundred ";
}
else if(temp==6)
{
if(num==0)
cout<<"six hundred million ";
else
cout<<"six hundred ";
}
else if(temp==7)
{
if(num==0)
cout<<"seven hundred million ";
else
cout<<"seven hundred ";
}
else if(temp==8)
{
if(num==0)
cout<<"eight hundred million ";
else
cout<<"eight hundred ";
}
else if(temp==9)
{
if(num==0)
cout<<"nine hundred million ";
else
cout<<"nine hundred ";
}

}

temp =(num/10000000)*10000000;
if(num!=0&&(temp%10000000)==0)
{
temp = num/100000000;
num = num-(temp*10000000);

if(temp==1)
tenmillion = 1;
else if(temp==2)
{
if(num==0)
cout<<"twenty million ";
else
cout<<"twenty ";
}
else if(temp==3)
{
if(num==0)
cout<<"thirty million ";
else
cout<<"thirty ";
}
else if(temp==4)
{
if(num==0)
cout<<"fourty million ";
else
cout<<"fourty ";
}
else if(temp==5)
{
if(num==0)
cout<<"fifty million ";
else
cout<<"fifty ";
}
else if(temp==6)
{
if(num==0)
cout<<"sixty million ";
else
cout<<"sixty ";
}
else if(temp==7)
{
if(num==0)
cout<<"seventy million ";
else
cout<<"seventy ";
}
else if(temp==8)
{
if(num==0)
cout<<"eighty million ";
else
cout<<"eighty ";
}
else if(temp==9)
{
if(num==0)
cout<<"ninety million ";
else
cout<<"ninety ";

}
}

temp =(num/1000000)*1000000;
if(temp==0&&tenmillion==1)
{

cout<<"ten million ";

}
if(((temp%1000000)==0)&&tenthousand==1)
{
temp = num/1000000;
num = num-(temp*1000000);

if(temp==1)
cout<<"eleven million ";
else if(temp==2)
cout<<"twelve million ";
else if(temp==3)
cout<<"thirteen million ";
else if(temp==4)
cout<<"fourteen million ";
else if(temp==5)
cout<<"fifteen million ";
else if(temp==6)
cout<<"sixteen million ";
else if(temp==7)
cout<<"seventeen million ";
else if(temp==8)
cout<<"eighteen million ";
else if(temp==9)
cout<<"nineteen million ";

}

if(tenmillion==0)
{
temp = num/1000000;
num = num-(temp*100000);
if(temp==1)
cout<<"one million ";
else if(temp==2)
cout<<"two million ";
else if(temp==3)
cout<<"three million ";
else if(temp==4)
cout<<"four million ";
else if(temp==5)
cout<<"five million ";
else if(temp==6)
cout<<"six million ";
else if(temp==7)
cout<<"seven million ";
else if(temp==8)
cout<<"eight million ";
else if(temp==9)
cout<<"nine million ";
}

temp =(num/100000)*100000;
if(num!=0&&(temp%100000)==0)
{
temp = num/100000;
num = num-(temp*100000);

if(temp==1)
{
if(num==0)
cout<<"one hundred thousand ";
else
cout<<"one hundred ";
}
else if(temp==2)
{
if(num==0)
cout<<"two hundred thousand ";
else
cout<<"two hundred ";
}
else if(temp==3)
{
if(num==0)
cout<<"three hundred thousand ";
else
cout<<"three hundred ";
}
else if(temp==4)
{
if(num==0)
cout<<"four hundred thousand ";
else
cout<<"four hundred ";
}
else if(temp==5)
{
if(num==0)
cout<<"five hundred thousand ";
else
cout<<"five hundred ";
}
else if(temp==6)
{
if(num==0)
cout<<"six hundred thousand ";
else
cout<<"six hundred ";
}
else if(temp==7)
{
if(num==0)
cout<<"seven hundred thousand ";
else
cout<<"seven hundred ";
}
else if(temp==8)
{
if(num==0)
cout<<"eight hundred thousand ";
else
cout<<"eight hundred ";
}
else if(temp==9)
{
if(num==0)
cout<<"nine hundred thousand ";
else
cout<<"nine hundred ";
}

}

temp =(num/10000)*10000;
temp = (temp%10)*temp;

if(num!=0&&(temp%10000)==0)
{
temp = num/10000;
num = num-(temp*10000);

if (temp==1)
tenthousand = 1;
else if(temp==2)
{
if(num==0)
cout<<"twenty thousand ";
else
cout<<"twenty ";
}
else if(temp==3)
{
if(num==0)
cout<<"thirty thousand ";
else
cout<<"thirty ";
}
else if(temp==4)
{
if(num==0)
cout<<"fourty thousand ";
else
cout<<"fourty ";
}
else if(temp==5)
{
if(num==0)
cout<<"fifty thousand ";
else
cout<<"fifty ";
}
else if(temp==6)
{
if(num==0)
cout<<"sixty thousand ";
else
cout<<"sixty ";
}
else if(temp==7)
{
if(num==0)
cout<<"seventy thousand ";
else
cout<<"seventy ";
}
else if(temp==8)
{
if(num==0)
cout<<"eighty thousand ";
else
cout<<"eighty ";
}
else if(temp==9)
{
if(num==0)
cout<<"ninety thousand ";
else
cout<<"ninety ";
}

}

temp =(num/1000)*1000;

if((temp==0)&&(tenthousand==1))
{

cout<<"ten thousand ";

}
if(((temp%1000)==0)&&tenthousand==1)
{
temp = num/1000;
num = num-(temp*1000);

if(temp==1)
cout<<"eleven thousand ";
else if(temp==2)
cout<<"twelve thousand ";
else if(temp==3)
cout<<"thirteen thousand ";
else if(temp==4)
cout<<"fourteen thousand ";
else if(temp==5)
cout<<"fifteen thousand ";
else if(temp==6)
cout<<"sixteen thousand ";
else if(temp==7)
cout<<"seventeen thousand ";
else if(temp==8)
cout<<"eighteen thousand ";
else if(temp==9)
cout<<"nineteen thousand ";
else if(temp==0)
cout<<" ";

}

if(tenthousand==0)
{
temp = num/1000;
num = num-(temp*1000);
if(temp==1)
cout<<"one thousand ";
else if(temp==2)
cout<<"two thousand ";
else if(temp==3)
cout<<"three thousand ";
else if(temp==4)
cout<<"four thousand ";
else if(temp==5)
cout<<"five thousand ";
else if(temp==6)
cout<<"six thousand ";
else if(temp==7)
cout<<"seven thousand ";
else if(temp==8)
cout<<"eight thousand ";
else if(temp==9)
cout<<"nine thousand ";
}

temp =(num/100)*100;
if(num!=0&&(temp%100)==0)
{
temp = num/100;
num = num-(temp*100);

if(temp==1)
cout<<"one hundred ";
else if(temp==2)
cout<<"two hundred ";
else if(temp==3)
cout<<"three hundred ";
else if(temp==4)
cout<<"four hundred ";
else if(temp==5)
cout<<"five hundred ";
else if(temp==6)
cout<<"six hundred ";
else if(temp==7)
cout<<"seven hundred ";
else if(temp==8)
cout<<"eight hundred ";
else if(temp==9)
cout<<"nine hundred ";

}
temp =(num%10)*10;
if(num!=0&&(temp%10)==0)
{
temp = num/10;
num = num-(temp*10);

if(temp==1)
ten = 1;
else if(temp==2)
cout<<"twenty ";
else if(temp==3)
cout<<"thirty ";
else if(temp==4)
cout<<"forty ";
else if(temp==5)
cout<<"fifty ";
else if(temp==6)
cout<<"sixty ";
else if(temp==7)
cout<<"seventy ";
else if(temp==8)
cout<<"eighty ";
else if(temp==9)
cout<<"ninety ";

}
temp =(num%1)*1;
if(num==0&&ten==1)
{
temp = num/1;
num = num-(temp*1);
cout<<"ten ";

}
if(((temp%1)==0)&&ten==1)
{
temp = num/1;
num = num-(temp*1);

if(temp==1)
cout<<"eleven ";
else if(temp==2)
cout<<"twelve ";
else if(temp==3)
cout<<"thirteen ";
else if(temp==4)
cout<<"fourteen";
else if(temp==5)
cout<<"fifteen ";
else if(temp==6)
cout<<"sixteen ";
else if(temp==7)
cout<<"seventeen ";
else if(temp==8)
cout<<"eighteen ";
else if(temp==9)
cout<<"nineteen ";
else if(temp==0)
cout<<" ";

}
else if(ten==0)
{
temp = num/1;
num = num-(temp*1);

if(temp==1)
cout<<"one ";

else if(temp==2)
cout<<"two ";
else if(temp==3)
cout<<"three ";
else if(temp==4)
cout<<"four ";
else if(temp==5)
cout<<"five ";
else if(temp==6)
cout<<"six ";
else if(temp==7)
cout<<"seven ";
else if(temp==8)
cout<<"eight ";
else if(temp==9)
cout<<"nine ";

}
}
else
cout<<"The number you've entered is invalid! :D/>";

cout<<"\nDo you want to try again?(y/n) ";
cin>>ans;
tenmillion=0, tenthousand=0, ten=0, temp=0;

system("cls");
}

cout<<"\n \n";

}

```

yes ive done that too, but its still not working:(
5. In Topic: my case study is converting words to number, vise versa..

Posted 26 Aug 2012

```temp =(num/10000)*10000;
temp = (temp%10)*temp;
if(num!=0&&(temp%10000)==0)
{
...

```

is that the right position? im sorry if i dont get it:(

Member Title:
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

E-mail:
Private