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, 22.06.2019 00:30
Which of the following methods could be considered a “best practice” in terms of informing respondents how their answers to an on-line survey about personal information will be protected? respondents are informed that investigators will try to keep their participation confidential; however, confidentiality cannot be assured. respondents are informed that a research assistant will transfer all the research data to a password-protected computer that is not connected to the internet, via a usb flashdrive. the computer is located in a research team member’s office. the investigator uses the informed consent process to explain her institution’s method for guaranteeing absolute confidentiality of research data. the investigator uses the informed consent process to explain how respondent data will be transmitted from the website to his encrypted database without ever recording respondents’ ip addresses, but explains that on the internet confidentiality cannot be absolutely guaranteed.
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
Who is the first president to use social media as part of his campaign strategy
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Which best compares appointments and events in outlook 2010appointments have a subject man, and events do notappointments have a specific date or range of dates, and events do notappointments have a start and end time of day, and events do notappointments have a location option, and events do not
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
You have been supporting csm tech publishing's windows server 2016 server network for over a year. the office has two windows server 2016 servers running active directory and a number of other roles. management has informed you that a small sales office is opening in the same building three floors up. the sales manager wants to install a sales application on a server located in the sales office. this server will have limited physical security because there's no special room dedicated for it, which means it will be accessible to non-it personnel and visitors. you're considering installing windows server 2016 server core on the new server because accessing its console regularly probably won't be necessary, and this server will be managed from one of the other csm tech publishing servers. what are the benefits and drawbacks of using server core for this branch office? what are some things you should do to set up this server management environment?
Answers: 1
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
History, 24.01.2020 07:31
question
Mathematics, 24.01.2020 07:31
question
Mathematics, 24.01.2020 07:31
question
Mathematics, 24.01.2020 07:31
Questions on the website: 13722361