Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1: Write a C program that do the following: Write a comment at the beginning of the program contains your name, ID, and Section

image text in transcribed
image text in transcribed
image text in transcribed
Question 1: Write a C program that do the following: Write a comment at the beginning of the program contains your name, ID, and Section Number Print your information as the following: I am My university ID is My major is My email address is Safaa Hriez. 20170000. Computer Science. 3. hriez@psut.edu.jo Write your name in this pattern. Example, if your name is Safaa: 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 customerName 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 each digit of the number in the corresponding index in the array. Example: 4321 number[0] 1 number[1] 2 number[2] 3 number[4] 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 R array, and save the addition of the second and third elements of the number array in the second element in the Rarray. Example: based on the previous example: R[O] 1*4 = 4 R[1] 2+3 - 5 Print the content of the Rarray. 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle PL/SQL Programming Database Management Systems

Authors: Steven Feuerstein

1st Edition

978-1565921429

Students also viewed these Databases questions