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 based

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, and variable a are floating-point values. The plaintext_character and encoded_character variables are characters, and the a variable is an integer. The constants used in the equations must be defined as constant macros (#defined constants). Error checking is not required for your program. You do not need to check for faulty user input or dividing by zero.

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

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