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
Compare the memory organization schemes of contiguous memory allocation and paging with respect to the following issues: a. Exte
Free_Kalibri [48]

Answer:

The comparison is based on memory organization schemes of contiguous memory allocation and paging with respect to External fragmentation, Internal fragmentation and Ability to share code across processes.

Explanation:

Memory organization schemes of contiguous memory allocation:

Contiguous memory allocation schemes suffers from external fragmentation. The reason is that address space is distributed contiguously and the holes and gaps keep growing when the old processes die and new processes are introduced. The variable size partition suffers from external fragmentation however the fixed size partitions do not suffer from external fragmentation. Contiguous memory allocation with variable size partitions does not encounter an internal fragmentation but with fixed size partitions suffers from internal fragmentation. Contiguous memory allocation does not support sharing code across processes. This is because the virtual memory segment of a process is not fragmented into non-contiguous fine grained blocks.

Paging:

Paging does not encounter external fragmentation as pages are of the fixed or equal size. So this reduces external fragmentation. However paging suffers from internal fragmentation. This is because a process can request more space or it can request for a less space. When page is allocated to the such a process that page is no longer utilized.This results in internal fragmentation because of the wastage of space even when the page has internal space but cannot be fully utilized. Paging allows to share code across processes.

5 0
2 years ago
Match the careers with the career clusters.
creativ13 [48]
<h2>Answer and Explanation:</h2>

The picture shows the right careers with their respective career clusters.

4 0
2 years ago
Read 2 more answers
In order to write a successful algorithm, you must first be able to:
svp [43]
First define the problem
4 0
2 years ago
In three to five sentences, describe how you can organize written information logically and sequentially
gogolik [260]

I’d organize my writing by using the five paragraph method and set it up in a chronological order. I’d begin with an introduction. An introduction will make the reader understand the topic and what I am going to be talking about in the body paragraph. An introduction has the hook which draws the reader with good and interesting sentences. There is also the bridge and then there is the thesis statement that will explain my main points. Next is to write the body paragraph. This will explain the points in the intro in more depth so that the reader can better understand what is going on. Lastly there is the conclusion, which reviews will review my main point again and summarize all of my points.

5 0
2 years ago
Your license can be canceled if you __________
Gemiola [76]
Your license can be canceled if you do not have proof of insurance or if you have unpaid tickets or fines. Your license can also be canceled if you are behind in child support payments in Florida.
6 0
2 years ago
Read 2 more answers
Other questions:
  • Which statement about dialogues is NOT correct? Select one: A. Users should be able to control the direction of speed of dialogu
    5·1 answer
  • Doctors discovered a tumor in Amanda’s brain and used robotic surgery to remove it. Which best describes the role a worker in th
    15·2 answers
  • Drag each tile to the correct box.
    12·1 answer
  • Sarah works in a coffee house where she is responsible for keying in customer orders. A customer orders snacks and coffee, but l
    13·2 answers
  • Consider the following class definitions.
    10·1 answer
  • You want to register the domain name ABCcompany.org, but the registration service is not allowing you to do that. What's the mos
    10·1 answer
  • Which argument forces a writer to return to and change the input before resolving a “UnicodeError”?
    10·1 answer
  • If Maya wants to access a view that would control multiple slides within a presentation, which view should she utilize? Master v
    9·1 answer
  • When should a developer begin thinking about scalability? 1 during the design phase 2during testing 3when traffic increases by 2
    14·1 answer
  • A customer opened a file attachment, and now her PC is infected with ransomware. She's unable to open any of her files. Which ac
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!