H Write a program to read a number from keyboard maximum three digits long as a long integer and print it in alphabetic

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

H Write a program to read a number from keyboard maximum three digits long as a long integer and print it in alphabetic

Post by answerhappygod »

H Write A Program To Read A Number From Keyboard Maximum Three Digits Long As A Long Integer And Print It In Alphabetic 1
H Write A Program To Read A Number From Keyboard Maximum Three Digits Long As A Long Integer And Print It In Alphabetic 1 (23.47 KiB) Viewed 95 times
H Write A Program To Read A Number From Keyboard Maximum Three Digits Long As A Long Integer And Print It In Alphabetic 2
H Write A Program To Read A Number From Keyboard Maximum Three Digits Long As A Long Integer And Print It In Alphabetic 2 (18.12 KiB) Viewed 95 times
H Write a program to read a number from keyboard maximum three digits long as a long integer and print it in alphabetic spelling form. Consider the following Java code fragment: String[] oneDigit {"","one","two","three", " four"); String ans = oneDigit[2]; // Now ans is equal to two" Note that we can find alphabetic representation of a one digit number using array and index of the array. Study pattern of the numbers and discover how they are repeating themselves, like: 222 that is two hundred twenty two

Expand your program to numbers up to 15-digits long. Note that a long integer can hold a number up to 15-digits long, and it is much easier if you read your number as a long integer. Now study the pattern of the numbers. For example: 222222222 that is two hundred twenty two million, and two hundred twenty two thousand, and two hundred twenty two. As you can see from above example, the pattern is just repeated, and the only difference is the suffix of the: million, thousand, and nothing (an empty string).
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply