Objective

Extract out the abscissa and ordinate from an input co-ordinate point.

Difficulty

Very easy

Description

A co-ordinate is a point on a Cartesian plane, having a value for the x-axis and a value for the y-axis.

It's usually denoted as follows:

(x, y)

The first number inside the parentheses is the value for x-axis, formally known as the abscissa. The second number is the value for the y-axis, formally known as the ordinate.

In this exercise, given a co-ordinate, we ought to extract out the abscissa and ordinate from it and print them, each on a new line.

Ask the user to input a co-ordinate with the following prompt message:

Enter a co-ordinate:

The input value should be of the following form: (x,y), where x is the abscissa and y is the ordinate.

There should be no space in the input value between x, , and y.

Once the co-ordinate is given, extract out the abscissa and ordinate from it and output them, each on a new line, after leaving a blank line to start with.

A couple of examples follow:

Enter a co-ordinate: (3,1)

Abscissa: 3
Ordinate: 1
Enter a co-ordinate: (-3.5,10.4)

Abscissa: -3.5
Ordinate: 10.4

Hints