Question: Question 3: Write a C program that do the following: Declare an integer array of size 4 called myArray. Ask the user to enter a

 Question 3: Write a C program that do the following: Declare

Question 3: Write a C program that do the following: Declare an integer array of size 4 called myArray. 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 my Array(0) > 1 myArray[1] 2 my Array[2] 3 my Array(3) 4 Declare an integer array of size 2 called result. Save the addition of the first and last elements of the myArray array as the first element in the result array, and save the multiplication of the second and third elements of the myArray array in the second element in the result array. Example: based on the previous example: result[0] 1+4-5 result[1] 2*3 = 6 Print the content of the result array. The addition of the first and last elements is RESULT The multiplication of the second and third elements is RESULT The following are sample input/output: Enter a number of four digits: 4321 The addition of the first and last elements is 5 The multiplication of the second and third elements is 6

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 Databases Questions!