Ask your own question, for FREE!
Computer Science 21 Online
OpenStudy (anonymous):

need help writing a code that will read numbers from a user like 123 then print it out like one hundred twenty three this is what i have so far

OpenStudy (anonymous):

#include<iostream> using namespace std; int main() { int a, million, thous, hundred, temp, temp2; int million1, million10,million100, thous1, thous10, thous100, hundreds1, hundreds10, hundreds100; cout<<"enter a nine digit numer"<<endl; cin>>a; hundred=a%1000; temp=a/1000; thous=temp%1000; temp2=temp/1000; million=temp2; million1=million%10; temp=million/10; million10=temp%10; temp2=temp/10; million100=temp2; thous1=thous%10; temp=thous/10; thous10=temp%10; temp2=temp/10; thous100=temp2; hundreds1=hundred%10; temp=hundred/10; hundreds10=temp%10; temp2=temp/10; hundreds100=temp2; //cout<<million100<<endl; //cout<<million100<<million10<<million1<<thous100<<thous10<<thous1<<hundreds100<<hundreds10<<hundreds1<<endl; switch() return 0; }

OpenStudy (anonymous):

the max numbers is 999,999,999

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!