answer.
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]
2 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:
NeTakaya2 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
The height of a small rocket y can be calculated as a function of time after blastoff with the following piecewise function: y 5
SOVA2 [1]

Answer:

High level Language

understand

Explanation:

rocket is 0...4433456u888

5 0
1 year ago
Given positive integer n, write a for loop that outputs the even numbers from n down to 0. If n is odd, start with the next lowe
seropon [69]

Answer:

The program in Python is as follows:

n = int(input("Enter an integer: "))

if n < 0:

   n = 0

print("Sequence:",end=" ")

for i in range(n,-1,-1):

   if i%2 == 0:

       print(i,end = " ")

Explanation:

This gets input for n

n = int(input("Enter an integer: "))

This sets n to 0 if n is negative

<em>if n < 0:</em>

<em>    n = 0</em>

This prints the string "Sequence"

print("Sequence:",end=" ")

This iterates from n to 0

for i in range(n,-1,-1):

This check if current iteration value is even

   if i%2 == 0:

If yes, the number is printed

       print(i,end = " ")

7 0
1 year ago
What is retrieved from a search containing two terms separated<br> by the AND operator?
egoroff_w [7]

Answer:

A AND B= 1 or 0

1 1  1

0 1  0

1 0  0

0 0 0

So, as explained above if both are 1 we then only get 1, or else we get 0 always in case of AND which is a logical operator, whose output can be 0 or 1 only. This is being depicted above.

Explanation:

If both are 1 we get 1 or always else, we get the output =0.

8 0
1 year ago
Exponentiation Is a/an operater?​
garik1379 [7]

Answer:

Yes it is

Hope this helps

5 0
1 year ago
Which phrase best describes a scenario in Excel 2016?
Airida [17]

Answer:

what are the phrases?

Explanation:

6 0
1 year ago
Other questions:
  • Which statement regarding dialogues in multiplayer games is true? Dialogues are based only on players’ actions.
    7·2 answers
  • A two-dimensional array can have elements of ________ data type(s).
    7·1 answer
  • Write a program that can convert an integer between 0 and 15 into hex number (including 0 and 15). the user enters an integer fr
    15·1 answer
  • The ________ utility automatically creates duplicates of your libraries, desktops, contacts, and favorites to another storage lo
    6·1 answer
  • I need to write a really simple python program to solve this issue. I have most of the program written but, when I run the secon
    8·1 answer
  • Given an n-element array X, algorithm D calls algorithm E on each element X[i]. Algorithm E runs in O(i) time when it is called
    7·1 answer
  • Given the plaintext {0F0E0D0C0B0A09080706050403020100} and the key {02020202020202020202020202020202}: a. Show the original cont
    11·1 answer
  • Server farms such as Google and Yahoo! provide enough compute capacity for the highest request rate of the day. Imagine that mos
    12·1 answer
  • Write a program that calculates taxi fare at a rate of $1.50 per mile. Your pro-gram should interact with the user in this manne
    12·1 answer
  • The variable isopen is to be used to indicate whether or not a store is currently open. Which of the following is the most appro
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!