Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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 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. 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 radius * height 3. Character encoding: encoded character = plaintext character- + 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 ((XI-X2)2 + (y1-y2)2) (note: you will need to use sqrt ( ) out of math.h>) 5. Tangent: tan_theta sin (theta) cos (theta) cal nd the appropriate functions in ) 6. Total resistance of resistors in paalel: total resistance 111 R11 R2 1 / R3), for 3 resistors. R1, R2, and R3 are integers. 7. General equation: y = (2 / 3)-y + z "X / (a % 2) + Pl (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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2017 Skopje Macedonia September 18 22 2017 Proceedings Part 3 Lnai 10536

Authors: Yasemin Altun ,Kamalika Das ,Taneli Mielikainen ,Donato Malerba ,Jerzy Stefanowski ,Jesse Read ,Marinka Zitnik ,Michelangelo Ceci ,Saso Dzeroski

1st Edition

3319712721, 978-3319712727

More Books

Students also viewed these Databases questions