Write a program that takes an integer num between 1 and 99999, then computes the number of digits in num. If the number exceeds 99999 or is less than 1, the program must output "False" to the user, otherwise, the output can be "One", "Two", "Three", "Four", or "Five IMPORTANT NOTE - Do not add any cout statements except for the final answer as specified above. Do not add "Enter a number", "the number of digits is" or any similar prompts. Also note that the grader is case-sensitive; so "one" is wrong but "One" is correct. Do not add any unnecessary spaces I/O Program Input: An integer num between 1 and 99999 Program Output: A single line that only has the number of digits in num Sample Testcase 0: Input: 5 Output: One Sample Testcase 1: Input: 450 Output: Three Sample Testcase 2: Input: 1000220 Output: False

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 16RQ
icon
Related questions
Question
Write a program that takes an integer num between 1 and 99999, then computes the number of digits in num. If the number exceeds 99999 or is less than 1, the program must output "False" to the user, otherwise, the output can be "One", "Two", "Three", "Four", or "Five IMPORTANT NOTE - Do not add any cout statements except for the final answer as specified above. Do not add "Enter a number", "the number of digits is" or any similar prompts. Also note that the grader is case-sensitive; so "one" is wrong but "One" is correct. Do not add any unnecessary spaces I/O Program Input: An integer num between 1 and 99999 Program Output: A single line that only has the number of digits in num Sample Testcase 0: Input: 5 Output: One Sample Testcase 1: Input: 450 Output: Three Sample Testcase 2: Input: 1000220 Output: False
#include <iostream>
2 using namespace std;
int main() {
4
int num;
cin>>num;
6.
7
/ *
8
insert you code here
9.
* /
10
11
return 0;
12 }
Submit
LO
Transcribed Image Text:#include <iostream> 2 using namespace std; int main() { 4 int num; cin>>num; 6. 7 / * 8 insert you code here 9. * / 10 11 return 0; 12 } Submit LO
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT