c programming (very basic)

c programming (very basic)

Closed - This job posting has been filled and work has been completed.

Job Description

Instructions:
1) DesignaCprogramforthefollowingproblems.
2) Createflowchartsforthemenubasedmaincodeaswellaseachoption.
30 Marks
The commented C code and flowcharts should be submitted on Study Direct by 4pm Tuesday 10 December 2013.
The objective for the Main Project is to program a menu driven system that will give the user a choice of the five options as follows.
1) Calculatetherootsofaquadraticequationax^2+bx+c.Asktheusertosupplythe values a, b and c and the program will then calculate the roots.
10 Marks
2) Prompt the user for two real numbers (a and x) and an integer (n). Use a loop
structure to calculate a*(x^n). 10 Marks
3) Loadadatafile(e.g.data.txt),containingintegervalues,intoanarraybefore
presenting the user with a further options menu:
a. Print out the values
b. Calculate the mean
c. Calculate the RMS
d. Count the number of zero-values
e. Exit back to main menu
4) Exit the program. The program should:
50 Marks
• Use function calls for each of the active options
• Display an error message if the user selects an invalid option
• Display an error message if the file cannot be opened
• Display the menu after each menu choice until the Exit option is selected.
-------------------------------------------------Good Luck-------------------------------------------------

Open Attachment