/* CODE IN C */
#include<stdio.h>
#include<math.h>
int main()
{
/*Triangle 1*/
float alpha, a, hypotenuse;
printf("FOR TRIANGLE 1 ");
printf("Enter alpha = ");
scanf("%f", &alpha);
printf("Enter a = ");
scanf("%f", &a);
alpha = alpha * 3.14 / 180;//Convert beta to
radians
hypotenuse = a/sin(alpha);//Assuming a is
perpendicular for alpha
printf("Hypotenuse = %.3f ", hypotenuse);
/*Triangle 2*/
float beta, b;
printf("FOR TRIANGLE 2 ");
printf("Enter beta = ");
scanf("%f", &beta);
printf("Enter a = ");
scanf("%f", &a);
beta = beta * 3.14 / 180;//Convert beta to
radians
b = tan(beta) * a;//For angle beta, side a is base and
side b is the opposite side
printf("Opposite side of angle beta = %.3f ",
b);
return 0;
}
OUTPUT:
FOR ANY HELP REACH ME OUT IN COMMENTS
2. Write a program that prompts a user to enter the lengths of sides and angles...
Write a C++ program using user defined functions that will read in the lengths of two side of a right triangle and then calculate the length of the hypotenuse. The program should do this twice. The program should the following user defined functions: Function readA will read in a value for side A from the user and return it to main. (it will not receive any input data from main) Function readB will read in a value for side B...
Find the lengths of the missing sides if side ais opposite angle A, side bis opposite angle B, and side c is the hypotenuse Draw a right triangle labeling side a, side b, and hypotenuse, and their corresponding angles. Define the ratio for tan(A) in terms of ab, or what proportion relates the given valu for tan(A) and the defined ratio for tan(A)? How is this proportion solved for a with values for side and sideb, use the Pythagorean Theorem...
The "for more practice part" using matlab If the lengths of two sides of a triangle and the angle between them are known, the length of the third side can be calculated. Given the lengths of two sides (b and c) of a triangle, and the angle between them alpha in degrees, the third side a is calculated as follows a^2 = b^2 + c^2 - 2b c cos(alpha) White a script thirdside that will prompt the user and read...
Using Pythagorean's Theorem, find the hypotenuse if the two sides have a length of 300m and 400m (Pythagorean's Theorem states that a^2 + b^2 = c^2, where a and b are the lengths of the sides of a right triangle and c is the length of the side opposite the 90 degree angle).
Write the java program: A right triangle can have sides whose lengths are all integers. The set of three integer values for the length of the sides of a triangle is called a Pythagorean triple. The length of the three sides must satisfy the relationship that the sum of the squares of the sides is equal to the square of the hypotenuse. Write a Java application that prompts the user for an integer that represents the largest side value and...
Learning Goal:To use trigonometric functions to find sides and angles of right triangles.The functions sine, cosine, and tangent are called trigonometric functions (often shortened to "trig functions"). Trigonometric just means "measuring triangles." These functions are called trigonometric because they are used to find the lengths of sides or the measures of angles for right triangles. They can be used, with some effort, to find measures of any triangle, but in this problem we will focus on right triangles. Right triangles...
Write a program that prompts the user to enter the sides and their length of a regular polygon and display its area. ****Using c++
he lengths of the three sides of a triangle (not necessarily a right triangle) are 3.56 meters, 5.07 meters and 2.09 meters. What is the cosine of the angle opposite the side of length 2.09 meters? cos theta =_________
PLEASE READ AND CODE IN BASIC C++ CODE. ALSO, PLEASE CODE USING THIS DO WHILE LOOP AND FORMAT: #include <iostream> using namespace std; int main() { //variables here do { // program here }while (true); } Objectives To learn to code, compile and run a program containing SELECTION structures Assignment Write an interactive C++.program to have a user input the length of three sides of a triangle. Allow the user to enter the sides...
Write a C++ program to analyze a variety of triangles. The program should determine all angles and all sides for a triangle for three different options (give the user a menu of choices): 1) Given two sides and the angle between 2) Given two angles and one side 3) Given three sides More details for each option is provided below. Option 1: Given two sides and the angle between First check to be sure that the three values entered are...