TORONTO KIDS COMPUTER CLUB | PMCA Sunday 10:00 Java Homework 20.02.02.
17032
post-template-default,single,single-post,postid-17032,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

PMCA Sunday 10:00 Java Homework 20.02.02.

06 Feb PMCA Sunday 10:00 Java Homework 20.02.02.

Question:

Write a method that reads in three angles (in degrees). State the type of the triangle based on the conditions below:

  • If all three angles are 60, output Equilateral.
  • If the three angles add up to 180 and exactly two of the angles are the same, output Isosceles.
  • If the three angles add up to 180 and no two angles are the same, output Scalene.
  • If the three angles do not add up to 180, output Error.
No Comments

Sorry, the comment form is closed at this time.