Search⌘ K

Example 15: Find the Position of a Point on the Plane

Explore how to create a C program that identifies the location of a point on the coordinate plane. This lesson guides you through combining if-else decision statements to classify points as origin, axis, or quadrant, helping you apply control flow in practical programming scenarios.

We'll cover the following...

Problem

Given a point (x, y), write a program to determine its location on the coordinate plane.

The output should be printed on the console in the following manner:

  • origin
  • x-axis
  • y-axis
  • First
...