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
Assume your friend just sent you 32 bits of pixel data (just the 0s and 1s for black and white pixels) that were encoded after s
lara31 [8.8K]

Answer:

your friend just sent you 32 bits of pixel data (just the 0s and 1s for black and white pixels) that were encoded after sampling an image. Choose the two statements that are true.

------------------

The 32 bits of pixel data is enough to produce the image using the widget. Nothing else is needed.

------------------------

The digital image would be an exact copy of the analog image.

-----------------------------The correct width and height must be input into the pixelation widget to produce the image.

---------------------------The fact that only 32 bits were used to represent the image indicates relatively large sample squares were used. The digital image may vary from the analog image significantly

Explanation:

3 0
2 years ago
Write pseudocode for a program which will ask a user to enter two numbers a and b. It then asks what operation is to be performe
sleet_krkn [62]

get int input for a

get int input for b

get string input for operator

if a is not int or b is not int throw exception and print error

if operator is not * / // or % throw exception and print error

if operator is * do multiplication of a and b and make answer c

else if operator is / do division of a and b and make answer c

else if operator is // do floor division of a and b and make answer c

else if operator is % do floor modulo of a and b and make answer c

print c

5 0
2 years ago
One subtask in the game is to roll the dice. explain why is roll the dice an abstraction.
LUCKY_DIMON [66]

Answer:

A game is built from a combination of sub-tasks in order to provide the best experience to the user and make sure that the interface is comprises of only the results of the ongoing sub-tasks to provide a higher degree of data abstraction.

Data abstraction refers to the process of representing the essential information without including the background details. Rolling a dice is preferred to be a sub-task so that the user only gets to know about the result of the roll and does not have to wait for or anticipate the result. Moreover, a game may consist of n number of sub-tasks so it is not a good idea to include them in the main framework and are preferred to be abstracted.

4 0
2 years ago
based on the transcript, what did broadcasting the story through the medium of radio allow welles to do?
tamaranim1 [39]

Answer:

It was Halloween morning, in 1938, Orson Welles opened his eyes just to discover himself as the most trending person in the USA. Just the past night, Welles together with his Mercury Theatre performed the radio adaption of the Wars of the Worlds, written by H.G. Wells. He transformed around 40 years old novel into the false news edition which broadcasted the news of Martian attack on New Jersey.

Explanation:

It was Halloween morning, in 1938, Orson Welles opened his eyes just to discover himself as the most trending person in the USA. Just the past night, Welles together with his Mercury Theater performed the radio adaption of the Wars of the Worlds, written by H.G. Wells. He transformed around 40 years old novel into the false news edition which broadcasted the news of Martian attack on New Jersey. Just previously it was Halloween night, and hence, this was expected. And various listeners of the show were shocked, and they made a lot of crazy calls to the nearby Police Stations, as well as the newspaper publication houses. The radio stations tried to convince various journalists that the radio episode was able to cause hysteria throughout the USA. And by the very next dawn, the front column of each new newspaper from coast to coast together with the headlines related to the huge panic inspired allegedly by the CBS broadcast.

8 0
1 year ago
What is the distance rn between the point of application of n⃗ and the axis of rotation? what is the distance rw between the poi
Mandarinka [93]

Complete Question.

A. Suppose that you are holding a pencil balanced on its point. If you release the pencil and it begins to fall, what will be the angular acceleration when it has an angle of 10.0 degrees from the vertical?

B. What is the distance rn between the point of application of n⃗ and the axis of rotation?

C. What is the distance rw between the point of application of w⃗ and the axis? enter your answers in meters separated by a comma?

Answer:

A. â = - 17rad/s²

B. rn = 0, meters

C. rw = 0.074, meters

Explanation:

Where;

l = length of the pencil

θ = angle between the vertical line and the pencil

â = angular acceleration.

The torque due to weight about the pivotal point is negative since it's clockwise;

t = - mg(l/2)sinØ ..... equation 1

torque with respect to angular acceleration;

t = Iâ ..... equation 2

The moment of Inertia of the pencil about one end;

I = (ml²)/3

Substituting I into equation 2;

t = [(ml²)/3]×â

Equating the equation, we have;

[(ml²)/3]×â = - mg(l/2)sinØ

â = (-3gsinØ)/2l

â = (-3*9.8*sin10°)/(2*0.15)

Angular acceleration, â = -17rad/s²

B. The normal force is acting at the normal force only, so the distance r n between the point of application of n ⃗ and the axis of rotation is zero because the axis of pencil is passing the same point of application w.

C. rn = (lcosØ)/2

rn = (0.15 * cos10°)/2

rn = (0.15 * 0.9848)/2

rn = (0.1477)/2

rn = 0.074m.

Since the gravity acts at exactly half of the length of pencil, distance r w between the point of application of w⃗ and the axis equals 0.074m.

8 0
2 years ago
Other questions:
  • Suppose the algorithms used to implement the operations at layer k is changed. how does this impact services at layers k-1 and k
    10·1 answer
  • If you want to present slides to fellow students or coworkers which productivity software should you use to create them A. Word
    14·2 answers
  • Read first a user's given name followed by the user's age from standard input. Then use an ofstream object named outdata to writ
    6·1 answer
  • You are the IT security administrator for a small corporate network. Samuel Garcia (sgarcia) has been away on vacation and has f
    9·1 answer
  • Interpretations of​ Moore's law assert​ that:
    13·1 answer
  • Recall the problem of finding the number of inversions. As in the text, we are given a sequence of n numbers a1, . . . , an, whi
    8·1 answer
  • A ______________ deals with the potential for weaknesses within the existing infrastructure to be exploited.
    10·2 answers
  • Provide an example by creating a short story or explanation of an instance where availability would be broken.
    10·1 answer
  • Two devices are connected to the Internet and communicating with one another. A squirrel chews through one of the wires in the n
    6·1 answer
  • Identify the tips to create a well-designed digital portfolio.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!