Compute the unknown quantity and print the result

Assignment Help Computer Engineering
Reference no: EM132196851

Question :

Write a C program that solves for any one of the following unknown parameters of a right triangle, if given two other known parameters from the following list:

Length of the base.

Length of the vertical side.

Length of the hypotenuse.

The angle between the base and the hypotenuse.

The angle between the vertical side and the hypotenuse.

The program should prompt the user to choose which one of the unknowns they want to solve for and take as input into the program the input from the user.

The program should then prompt the user which of the two known quantities they have (make sure to include logic to exclude the option of the unknown variable value that they are trying to compute).

Then take as input the values of the known quantities and compute the unknown quantity and print the result to the screen.

This program will require you to utilize the concepts of:

-Datatypes (you probably don't want to use int's...)

-Variables

-Getting data from the outside world into your program.

-Writing to the screen (use the printf function).

-Doing simple arithmetic/trigonometric operations on the values stored in the variables and storing that into another variable.

-Control flow (if/else statements)

-Possibly loops (for loops, while loops, etc).

-And other minor details (all of which are covered in your required reading assignment on C

- please don't ask where this is located at, simply look in Week 7 for the reading assignment - it is there).

-All angles should be in degrees (you may have to convert from radians to degrees).

You may use features from C++ if you would like (such as cin and cout from the std library) since you can think of C++ as a superset of C.

Reference no: EM132196851

Questions Cloud

Write a c program which uses a structure type : Write a C program which uses a structure type that stores data records for a car, as described in the Requirements.
Aspect of the law would be both easy and challenging : Support your position with reasons why you believe the aspect of the law would be both easy and challenging.
Determine the market demand schedule on the assumption : On the basis of the three individual demand schedules in the following table and assuming these three people are the only ones in the society.
Harley-davidson based on relevant five-force analysis : The critical competitive forces in the motorcycle industry that may threaten Harley-Davidson based on a relevant five-force analysis.
Compute the unknown quantity and print the result : Take as input the values of the known quantities and compute the unknown quantity and print the result to the screen.
What happens to the equilibrium price and quantity : Illustrate what happens to the equilibrium price and quantity of oil and Cadillacs in the United States. Provide an explanation below the diagram.
The SIER hierarchy of active listening includes : The SIER hierarchy of active listening includes. All of the following represent customer loyalty except.
Discuss about the pros and cons of your recommendations : To respond to the patients’ concerns, generate recommendations to remove the causes you have identified. Discuss about the pros and cons of your recommendations
Write a c program for a shopping list : Write a C program for a shopping list. Use the listed items and add one additional item to the list.

Reviews

Write a Review

Computer Engineering Questions & Answers

  You have been hired to write down a program for the

you have been hired to write a program for the hollywood movie rating guide in which users continuously enter a value

  Create a directory that you will use for course

Write a C program, convert2tenandhex.c that takes one command line parameter. The parameter is an integer either in decimal or hexadecimal - Create a directory that you will use for this course.

  Develop detailed object-oriented design models

You have the following two choices to develop detailed object-oriented design models. Validating an OO design through the construction of a prototype

  Create an integer array which contains ten elements

Create a VB.NET Console Application that defines a function Smallest and calls this function from the main program.

  What is the result of the receivers crc calculation

What is the result of the receiver's CRC calculation? Show your work. Does the receiver know that an error has occurred?

  Create a conceptual data modeling for the dataset

Using the identified dataset, create a conceptual data modeling for the dataset; you may use the software of your choice.

  Examine the effect of caffeine on depression

His research hypothesis is that a moderate dose (25 mg) of caffeine will lower depression scores on a psychological test when compared with no caffeine.

  Implement the process method by introducing an echo

Your task is to implement the process method by introducing an echo. For each sound value, add the value from 0.2 seconds ago.

  Why control would be an effective mitigation strategy

Find an article on the Internet outline a security breach or cyberattack. Provide a link to the article and suggest a control that would mitigate.

  Determining the bandwidth

Suppose N ethernet stations, all trying to transmit at the same time, need N/2 slot time in order to sort out who transmit next. Supposing the average packet size is 5 slot times, express the available bandwidth as a function of N?

  Describe a simple method for sorting

Given an array A of n integers in the range [0,n2 - 1], describe a simple method for sorting A in O(n) time.

  What are differences between primary and secondary storage

What are the differences between primary and secondary storage? How does a workstation differ from a PC?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd