0
In constructing (solving) triangles when two sides are given but the angle is not included (SSA), this results in the ambiguous
In constructing (solving) triangles when two sides are given but the angle is not included (SSA), this results in the ambiguous case. If the angle is acute, there are three cases: 1. No triangle can be constructed. 2. One triangle can be constructed 3. Two triangles can be constructed. Write a program that will ask the user to input a, b and 4 (an acute angle in degrees) of a triangle and determine the number of triangles that can be constructed. https://www.sololearn.com/discuss/3207553/?ref=app https://code.sololearn.com/WG5ootDXAdGe/?ref=app https://code.sololearn.com/WP8GTs8osj47/?ref=app https://code.sololearn.com/WTSWg4p6wKsu/?ref=app
12 Antworten
+ 6
Darkwa Richard Where is your own attempt and which programming language are you talking about? Why are you link of someone code ?
+ 5
Darkwa Richard This is incomplete code attach the programming tag and go to '+ insert' button click on it then you can see code bits then you can the code
+ 5
If you don't try it then we can't also help you, sorry.
+ 4
In right corner you can see also '+' icon insert your code, then you can see top 'hot today' drop-down menu click on it then you can see code bits click on it then share your code
+ 3
What exactly is your question? I see a lot of links that seem unrelated.
+ 3
I assume you need to write a program for this? What language is required? Have you made any attempt? If so share your codebit.( source code).
Here is some information that you may need to help you understand what is being asked before you even start to code.
https://www.mathsisfun.com/algebra/trig-solving-ssa-triangles.html
Update: Heres a Triangle calculator SSA tool.
https://www.triangle-calculator.com/?what=ssa
0
import javax.swing.JOptionPane;
public class SSAtriangle {
public static void main(String[] args) {
// Ask user to input sides and angle
double a = Double.parseDouble(JOptionPane.showInputDialog("Enter the length of side a:"));
double b = Double.parseDouble(JOptionPane.showInputDialog("Enter the length of side b:"));
double angle = Double.parseDouble(JOptionPane.showInputDialog("Enter the measure of angle C in degrees:"));
// Convert angle to radians
double radians = Math.toRadians(angle);
// Calculate height of triangle
double h = b * Math.sin(radians);
// Calculate the length of the side opposite the angle
double c = Math.sqrt(Math.pow(b, 2) - Math.pow(h, 2));
// Determine number of triangles that can be constructed
if (angle >= 90 || angle <= 0 || a >= b + c) {
JOptionPane.showMessageDialog(null, "No triangle can be constructed.");
} else if (a < c) {
0
My owns code
0
I can't run it
0
I can't see
0
Please you said right corner and I said I can't see .
Where
0
It may be on the left before you type. There is a plus to the left of my comment input that if I touch, opens with the add code option. Yours may be on the left like mine.