Question: Ouestion 3 Write a program that do the following Declare an integer array of size 4 called number. Ask the user to enter a number
Ouestion 3 Write a program that do the following Declare an integer array of size 4 called number. Ask the user to enter a number of four digits. Save each digit of the number in the corresponding index in the array. Example: 4321 number[0] 1 number[1] 2 number2] 3 number[3] 4 Declare an integer array of size 2 called R. Save the multiplication of the first and last elements of the number array as the first element in the Ramay, and save the addition of the second and third clements of the number array in the second element in the array Example: based on the previous example: RIOD 14-4 R[1] 243 - 5 Print the content of the array The multiplication of the first and last elements is RESULT The addition of the second and third elements is RESULT The following are sample input/output: Enter a number of four digits: 4321 The multiplication of the first and last elements is 4 The addition of the second and third elements is 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
