Problem: rectangle area

Write a C# program, which reads from the console two numbers, a and b, calculates and prints the are of a rectangle with sides a and b.

a b area
2 7 14
7 8 56
12 5 60

Hints and Guidelines

We make a new console C# program. To read both of the numbers, we use the folloing commands:

Its left to finish the program above, to calculate the area of the rectangle and to print it. Use the command that is already known to us Console.WriteLine() and put inside its brackets the multiplication of the numbers a and b. In programming, multiplication is done with the operator *.

Test your solution with a few examples. You have to receive a result, similar to this one (we enter 2 and 7 as input and the program prints result 14 - their multiplication):

2
7
14