anonymous
  • anonymous
Write a program that reads a whole number of up to nine digits and prints it in words. For example, the input 13247 ought to produce "thirteen thousand two hundred forty seven". i need a step-by-step explanation not the code and i am supposed use the switch statement
Computer Science
chestercat
  • chestercat
See more answers at brainly.com
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions

anonymous
  • anonymous
ya it will be mix-up of switch case and conditional statements
anonymous
  • anonymous
You could use integer division and mod to get each digit or convert to string and get each char as below. digit1 = 123456789 integer divided by 100000000 digit2 = (123456789 mod 100000000) integer divided by 10000000 etc or get string of 123456789 resulting in '123456789' then for each char in string get digit the do the switch/case on that digit now, you won't be working with strictly one digit at a time but this may give you an idea of how to go about it

Looking for something else?

Not the answer you are looking for? Search for more explanations.