Question: Write a C program that evaluates the equations provided below. All equations should be placed in a single project! The program must prompt the user

Write a C program that evaluates the equations provided below. All equations should be placed in a single project! 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, and variable a are floating-point values. The plaintext_character and encoded_character variables are characters, and the a variable is an integer. PI 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.

Character encoding: encoded_character = (plaintext_character - 'a') + 'A' (note: what happens if plaintext_character is lowercase?)

Gauss Lens Formula (solve for f): 1 / f = 1 / u + 1 / v, where u is the object distance, v is the image distance, and f is the focal length of the lens

Tangent: tan_theta = sin (theta) / cos (theta) (recall: find the appropriate functions in )

Resistive divider: vout = r2 / (r1 + r2) * vin

General equation: y = a / (a % 2) - (63 / -17) + x * z (recall: a is an integer; the 63 and -17 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 Databases Questions!