find the area of a parallelogram in csharp

To find the area of a parallelogram in C#, you can use the following formula:

main.cs
Area = base * height
21 chars
2 lines

Here's some sample code:

main.cs
double b = 10; // base
double h = 5; // height
double area = b * h; // area = base * height

Console.WriteLine("The area of the parallelogram is: " + area);
157 chars
6 lines

In this example, we're defining the base and height of the parallelogram, and then calculating the area using the formula. The result is then printed to the console.

Note: make sure to enter the correct values for the base and height of the parallelogram to obtain the correct result for the area.

gistlibby LogSnag