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
Strike441 [17]
4 years ago
11

Write a program to input value of three sides, to check triangle is triangle is possible to form of not​

Computers and Technology
1 answer:
NeTakaya4 years ago
3 0

Answer:

Explanation:

import java.util.Scanner;

public class KboatTriangleAngle

{

  public static void main(String args[]) {

      Scanner in = new Scanner(System.in);

      System.out.print("Enter first angle: ");

      int a1 = in.nextInt();

      System.out.print("Enter second angle: ");

      int a2 = in.nextInt();

      System.out.print("Enter third angle: ");

      int a3 = in.nextInt();

      int angleSum = a1 + a2 + a3;

       

      if (angleSum == 180 && a1 > 0 && a2 > 0 && a3 > 0) {

          if (a1 < 90 && a2 < 90 && a3 < 90) {

              System.out.println("Acute-angled Triangle");

          }

          else if (a1 == 90 || a2 == 90 || a3 == 90) {

              System.out.println("Right-angled Triangle");

          }

          else {

              System.out.println("Obtuse-angled Triangle");

          }

      }

      else {

          System.out.println("Triangle not possible");

      }

  }

}

OUTPUT:

You might be interested in
Does anyone have 2.19.4 Guess a number 2.0 code for codehs?
lubasha [3.4K]

Answer:

I'm trying to create a program that will ask the user for an exam score in the range 0 to 100. ... I want to take the python course but I have not class code, anyone can help?

Explanation:

3 0
3 years ago
Which of the following common software packages would help a business
Jobisdone [24]

Answer:

D. Spreadsheets

Explanation:

While A also seems correct, a spreadsheet is best at collecting and organizing data. Databases would only store data while a spreadsheet would keep those records, as well as help calculate a budget or payroll.

3 0
3 years ago
Which of the following is not a scene mode?
tatiyna
I believe the answer is C) Model.
7 0
4 years ago
Read 2 more answers
Rewrite this method so that it avoids the use of a return statement:
olganol [36]
Sorry we chose 0 for the denominator
8 0
3 years ago
10 H
stepan [7]

Answer:

50

Explanation:50 basically 10x5

6 0
3 years ago
Other questions:
  • HELP ASAP- YOU GET BRAINLIEST!!
    13·1 answer
  • If you want a user to enter exactly 20 values which loop would be the best to use
    12·1 answer
  • What are the technique CSP does for the Cloud Storage Security?
    10·1 answer
  • _________ involves connecting geographically remote computers into a single network and combining the computational power of all
    6·2 answers
  • After pasting data, what can be done to access more options for how to paste it? You can change the formatting in the original c
    11·1 answer
  • The picture that graphically represents the items you use in Windows is called a/an
    15·1 answer
  • For this question you must write a java class called Rectangle and a client class called RectangleClient. The partial Rectangle
    14·1 answer
  • Where do players resurrect if they have been destroyed in a game?
    13·1 answer
  • Java: Programming Question: Reverse OrderWrite a program that reads ten integers into an array; define another array to save tho
    10·1 answer
  • Your development team is planning to host a development environment on the cloud. This consists of EC2 and RDS instances. This e
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!