subject

For this program you will build a modular equation evaluator (you may want to start from your solution to programming assignment 1). Once again, you will write a C program that evaluates the equations provided below. The program must prompt the user for inputs for the equations and evaluate them based on the inputs. All equations should be placed into a single .c file. This means you should NOT have 7 Visual Studio projects or 7 .c files. All variables on the right hand sides of the equations must be inputted by the user. All variables, except for the plaintext_character, encoded_character, variable a, shift, R1, R2, and R3 are floating-point values. The plaintext_character and encoded_character variables are characters, and the a, shift, R1, R2, and R3 variables are integers. PI should be defined as a constant macro (#defined constant). Error checking is not required for your program. You also do NOT need to check for faulty user input. However, please consider inputs that could cause your program to work incorrectly. Newton’s Second Law of Motion: force = mass * acceleration
Volume of a cylinder: volume_cylinder = PI * radius2 * height
Character encoding: encoded_character = (plaintext_character - 'A') + 'a' - shift; shift is an integer (note: what happens if plaintext_character is uppercase? What happens with various shift keys?)
Distance between two points: distance = square root of ((x1 - x2)2 + (y1 - y2)2) (note: you will need to use sqrt ( ) out of )
Tangent: tan_theta = sin (theta) / cos (theta) (recall: find the appropriate functions in )
Total resistance of resistors in paralell: total_resistance = 1 / (1 / R1 + 1 / R2 + 1 / R3), for 3 resistors. R1, R2, and R3 are integers.
General equation: y = (2 / 3) - y + z * x / (a % 2) + PI (recall: a is an integer; the 2 and 3 constants in the equation should be left as integers initially, but explicitly type-casted as floating-point values)
For this assignment you are required to define, at a minimum, the functions provided below (note: the first 5 are your required prototypes for those functions!):

*double calculate_newtons_2nd_law (double mass, double acceleration)

*double calculate_volume_cylinder (double radius, double height)

*char perform_character_encoding (char plaintext_character, int shift)

*double calculate_distance_between_2pts (double x1, double x2, double y1, double y2)

*double calculate_tangent_theta (double theta)

*A function for calculating total parallel resistance (you must decide on a name, return type, and parameter list!)

*A function for calculating the general equation (once again, you must decide on a name, return type, and parameter list!)

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_law ( ) function should evaluate the equation defined as force = mass * 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. Prompts should be performed in main ( ) directly.

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. Name the header file for this assignment equations. h. The second file that needs to be defined is just a C source file. This file should be named equations. c and include all function definitions for the above functions. The last file that should be defined is the main. c source file. This file will contain the main ( ) function or driver for the program.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 04:00
Another name for addicting games.com
Answers: 1
question
Computers and Technology, 24.06.2019 08:20
Evaluate the scenario below and indicate how to handle the matter appropriately. situation: michael received an e-mail from what he thought was his doctor’s office, requesting his social security number. since he had just been in to see his doctor last week, he replied to the e-mail with his social security number.
Answers: 2
question
Computers and Technology, 24.06.2019 09:50
Self contained sequences of actions to be performed are? a. expressions b. algorithms c. functions d. formulas
Answers: 1
question
Computers and Technology, 25.06.2019 09:00
(environmental science semester 1) which statement best describes the limits of science? a. science cannot answer any abstract questions. b. when used properly, science can answer any questions. c. usually science can answer only mathematical questions. d. science cannot answer religious questions.
Answers: 2
You know the right answer?
For this program you will build a modular equation evaluator (you may want to start from your soluti...
Questions
question
Mathematics, 17.06.2020 23:57
question
Mathematics, 17.06.2020 23:57
question
Mathematics, 17.06.2020 23:57
question
Mathematics, 17.06.2020 23:57
question
Mathematics, 17.06.2020 23:57