1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
SCORPION-xisa [38]
3 years ago
10

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.
Computers and Technology
1 answer:
kogti [31]3 years ago
6 0
To long .. isn’t this for computer class ?
You might be interested in
On the cities worksheet, click cell f4 and enter a formula that will subtract the departure date (b1) form the return date (b2)
Mademuasel [1]
=(+B2-B1)*F3 is what you need to enter in cell F4
8 0
3 years ago
Did every packet arrive in the correct order? Describe what went wrong and whether your partner was able
snow_lady [41]

Answer:

to answer this question I am going to need a little bit more info

Explanation:

6 0
3 years ago
Which model allows you to make subsystems in parallel?
boyakko [2]
The model is Parallel Distributed Processing Model (PDP) wherein m<span>Memory results from weblike connections among interacting processing units operating simultaneously, rather than sequentially ( also known as the connectionist model).</span>
8 0
3 years ago
What is the name of the national outreach project?
bagirrra123 [75]

Answer:

FCCLA should be the answer.

Explanation:

5 0
3 years ago
Which of the following is a quantitative question?
slamgirl [31]
D it gives 2 options
3 0
3 years ago
Read 2 more answers
Other questions:
  • Which option allows you to link to a specific slide in another presentation?
    15·1 answer
  • A _______ record is responsible for resolving an ip to a domain name.
    9·1 answer
  • Given an integer variable count, write a statement that displays the value of count on the screen. Do not display anything else
    11·1 answer
  • The Zoom slider will allow users to _____.
    5·2 answers
  • The parallax perspective says that objects that are close up appear to move __________ than far away objects.
    10·1 answer
  • When considering changing the content of a cell which button should you press to leave the cell as it originally was?
    13·2 answers
  • What is a software? 2 sentences please, I'll mark u as brailiest
    12·1 answer
  • - A blacksmith is shoeing a miser's horse. The blacksmith charges ten dollars for his work. The miser refuses to pay. "Very well
    6·1 answer
  • Output is the act of is the act of entering the data to the computer?​
    10·1 answer
  • you have been tasked with configuring a digital information station in the office's lobby. guests will be able to use the statio
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!