In all programs the input should be entered using the keyboard.

  1. Write a program that performs km/h <-> m/s speed conversion. The program should show a selection menu, e.g.
    This program performs km/h <-> m/s speed conversion. Please enter
    (a) if you want to convert km/h to m/s;
    (b) if you want to convert m/s to km/h.
    
  2. Write a program that compares two numbers. The program should output -1 if the first number is greater than the second one, 1 if the second number is greater than the first one, and 0 if the numbers are equal.
  3. Let $x$ and $y$ be coordinates on a plane. Write a program that determines a plane quadrant of the coordinates.
  4. Sort three numbers that are provided as the input.
  5. Given three numbers, which denote triangle side lengths, as an input, write a program that determines if a triangle with such side lengths exists. If yes, calculate the area of the triangle (you may use Heron’s formula).
  6. Given three numbers, which denote triangle side lengths, determine which type the triangle belongs to:
    • right-angled;
    • obtuse-angled;
    • acute-angled.
  7. The same problem as above, but the input is two side lengths of the triangle and an angle between these sides.
  8. The same problem as above, but the input is triangle vertices, each defined by (x, y) coordinates.
  9. Given three numbers, which denote triangle side lengths, determine which type the triangle belongs to:
    • equilateral;
    • isosceles;
    • scalene.
  10. You are given a hole of a rectangular shape defined by dimensions AxB (Aand B are provided as an input), and a brick with dimensions PxQxR (P, Q and R are provided as an input). The brick can be rotated to fit in the hole, but it must stay perpendicular to the hole surface. Write a program that determines if the brick can be inserted in the hole.
  11. Write a program that solves a linear inequality: $Ax + B > 0$ ($A$ and $B$ are provided as the input).
  12. Write a program that solves a linear inequality: $(Ax+B)(Cx+D) > 0$ ($A$, $B$, $C$ and $D$ are provided as the input).
  13. Write a program that solves a square equation: $Ax^2 + Bx + C = 0$. The program should correctly handle cases when there are two solutions, one solution, zero solutions.
  14. Write a program that determines alighment of two circumferences, each defined by the center coordinates and the circumference radius.
  15. Write a program that determines whether a given year is a leap year. All years which are perfectly divisible by 4 are leap years except for century years (years ending with 00) which is leap year only it is perfectly divisible by 400.