Question: Required Prompt the user to enter two numbers. Create an array where: num [ 1 ] will be the first that is entered from the

Required
Prompt the user to enter two numbers.
Create an array where:
num[1] will be the first that is entered from the keyboard.
num[2] will be the second number that is entered from the keyboard.
num[3] will be the sum of num[1] and num[2].
num[4] will be the product of num[1] and num[2].
num[5] will be equal to num[4].
Read the first number from the keyboard.
Read the second number from the keyboard.
Create num[3], this will be the sum of num[1] and num[2].
Create num[4], this will be the multiplication of num[1] and num[2].
Display the sum of the two numbers.
Display the multiplication of the two numbers.
Extra Credit
Write an If statement that uses Branching (Hint: You can use Elself). If the first number entered is 0, then send
the user back above the prompt to enter the first number. If the second number is 0 then send the user to the
same location for the first number.
Display the sum of the two numbers.
Display the multiplication of the two numbers.
Set arr[5] equal to arr[4].
Write a While loop that will take arr[5], print it out and divide it by 2 so long as it is greater than 1.
What to turn in
Please submit your Lab as a Text Entry.
Required Prompt the user to enter two numbers.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!