Answered You can hire a professional tutor to get the answer.

QUESTION

Task 1 a. Create a loop that asks the user to input an integer greater than 5, and validates that the number is actually greater than 5. If the user...

Task 1

1.Create a loop that asks the user to input an integer greater than 5, and validates that the number is actually greater than 5.

●     If the user entered a number that is not greater than 5, ask the user to input another number.

●     Store the number in a local variable outside of the loop named "userNum"

2.Create a loop to print the word "banana" as many times as stored in userNum.

3.Create a loop that prints the number of digits in the integer "userNum".

  • Attachment 1
  • Attachment 2
Task 1a. Create a loop that asks the user to input an integer greater than 5, and validates that thenumber is actually greater than 5.. If the user entered a number that is not greater than 5, ask the user to inputanother number.. Store the number in a local variable outside of the loop named "userNum"b. Create a loop to print the word "banana" as many times as stored in userNum.c. Create a loop that prints the number of digits in the integer "userNum"Task 21| for (int i = 0; i < 5; it+){21int j = i;3141i++;51-= 2;61while (j > 0) ;71 }Write down the line numbers in the order they are executed. In the case of the for loop, multipleparts execute at different times. We will denote each component with a different labelThe initialization component should be denoted as line la.The condition component should be denoted as line 1bThe update component should be denoted as line 1cWrite down the values at each line into a table to keep track of each of the variables.
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question