Your Perfect Assignment is Just a Click Away
We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

Programming for Engineers

Programming for Engineers

Programming for Engineers (2020/2021)

C Programming Assignment

Instructions

1) Design and write one C program for all the problems, submit only one C source code file.

2) Write a report which includes your commented C code, screenshots of test results for each problem (run your code and show results), and flowcharts for problems 1 and 3 respectively. You must prepare your report in a Word document, and submit the report as one pdf file.

3) Commented C source code file and the report should be submitted online. Check the deadline on Canvas.

Problems

The objective for the Main Project is to program a menu driven system that will give user a choice of the 6 options as follows.

1) Ask user to enter your student candidate number, calculate the sum of the digits. If the sum is less than 20, display the sum to the power of 2, otherwise display the square root of the sum. If the sum equals to 25, display this sum as well. (15 Marks)

2) Calculate the roots of a quadratic equation ????2 + ???? + ?? = 0, when ??2 ? 4???? ? 0. Ask user to enter the values a, b and c, the program then calculates and displays the roots by calling a function. (Must use a user defined function). (15 Marks)

3) Prompt user for entering two integers a and x and an exponent integer n, use a loop structure to calculate ??+????. If the result is greater than 2147483647, display a message that the result is out of the value range of integer. (15 Marks)

4) Ask user to enter the following array data, then prompt the user to enter 18 to replace the last element in the array. Finally, calculate and display the product of all the data in the updated array.

12 22

38 40

11 33

(15 Marks)

5) Prompt user for entering any five numbers, find the minimum and maximum numbers among the five numbers using pointer variables. (15 Marks)

2

6) Load the data file (data.txt) which is given below into an array. Display an error message if the file cannot be opened. Design C codes to find the maximum value, count the number of positive values and the number of odd values. (25 Marks)

data.txt (Note: you need to create and save the data file, a, b, c, d, e and f are from your candidate numbers, for example, if your candidate number is 184579 then a=1, b=8, c=4, d=5, e=7 and d=9).

a

b

c

5

14

6

-7

-19

21

-3

0

37

10

-31

34

-37

-9

d

e

f

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Topnotch Essay only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided byTopnotch Essay are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Topnotch Essay is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Topnotch Essay, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.