Answered step by step
Verified Expert Solution
Question
1 Approved Answer
use C programming for the code. eecswsu.edu/-aofallon/cpts 121/progassignments/PA2htm DOO--) nertklocx d -u uasM bp D Moon Lovers Scale YouTube a litait: F nge Jal eal
use C programming for the code.
eecswsu.edu/-aofallon/cpts 121/progassignments/PA2htm DOO--) nertklocx d -u" uasM bp D Moon Lovers Scale YouTube a litait: F nge Jal eal A lga ial ao twichtv a Echelon Form-for le O Network Authenticat For this assignment you are required to define, at a minimum, the functions provided below (note: these are your required function prototypes or declarations): double calculate newtons-2nd-law (double mass, double acceleration) double calculate-volume-cylinder (double radius, double height) char perform-character-encoding (char plaintext-character) double calculate_gravity force (double mass1, double mass2, double distance) double calculate-tangent (double theta) double calculate-parallel-resistance (int r1, int r2, int r3) double calculate-distance-between-2pts (double x1, double y 1, double x2, double y2) double calculate-general-equation (int a, double x, double z) A function must be defined for each of the above function signatures. The task that is performed by each function corresponds directly to the equations defined under the Equations section. For example, the calculate newtons 2nd low function should evaluate the equation defined as orcemass acceleration and return the resultant force, etc. You must print the results to the hundredths place. Also, the functions should not prompt the user for inputs, nor display the result. Prompts and displaying results should be performed in main ( For this assignment you will need to define three different files, one file, called a header file (h) needs to be defined which will store all #includes, #defines, and function prototypes/declarations. Name the header file for this assignment equations.h. The secnd file that needs to be defined is just a C source file. This file should be named equations.c and include all definitions for the above functions. The last file that should be defined is the main c source ie This filewill contain ther am function cr drive ior her IV. Expected Results The following console window illustrates inputs and outputs that are appropriate for your program. Your program must display the results in a similar form as shown in the window. The window shows possible results, for the given input tests, for the first two equations. Note: all results must be displayed to the hundredths place c : wINDOWSIsystem 32 cmd.exe lease enter the nass and acceleration Cboth fleatin alues For use in Newton Neuton's Second law: force c naeacceleration 1b6.8825888 18258con law: 1869.8 18.25 1800. 18.25 lease enter the radius and height (both floatin olune of a cylinder: volune-cylinder . PIe radiu "2 height - 3.141592 * 12.459ear2 1.39 ress any key to continue 682.48
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started