Question: Question 2: Write a C program that do the following Declare a char array of size 20 called customerName. Prompt (ask) the user to enter
Question 2: Write a C program that do the following Declare a char array of size 20 called customerName. Prompt (ask) the user to enter his name. . Read the name of the user in the customer Name array Prompt the user the following message: Please enter the length and width of the land. Read the width and length into two variables of type float Compute the area of the land and print the result to the user as follows: The area of the land is RESULT The following are sample input/output: Please enter your name: Safaa Please enter the length and width of the land: 20 10 The area of the land is 200 Question 3: Write a C 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 cach digit of the number in the corresponding index in the array Example: 4321 number[0] number[1] 2 number/213 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 clement in the array, and save the addition of the second and third elements of the number array in the second clement in the Ramay. Example: based on the previous cxample: R[O] 104-4 R[1] 2-3-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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
