Question: Write a C program that evaluates the equations provided below. The program must prompt the user for inputs to the equations and evaluate them

  • Write a C program that evaluates the equations provided below. The program 

Write a C program that evaluates the equations provided below. The program must prompt the user for inputs to the equations and evaluate them based on the inputs. 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. The constant Pl must be defined as a constant macro (#defined constants). Error checking is not required for your program. You do not need to check for faulty user input or dividing by zero. However, please consider inputs that could cause your program to work incorrectly. 1. Newton's Second Law of Motion: force = mass * acceleration 2. Volume of a cylinder: volume_cylinder = PI * radius height 3. 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?) 4. Distance between two points: distance = square root of ((x - x) + (y - y)) (note: you will need to use sqrt () out of ) 5. Tangent: tan_thetasin (theta) / cos (theta) (recall: find the appropriate functions in ) 6. Total resistance of resistors in paralell: total_resistance = 1 / (1/R1+1/R2 + 1/R3), for 3 resistors. R1, R2, and R3 are integers. 7. 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)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!