From 0acd38221e470121876670e17425a2ed0ca92055 Mon Sep 17 00:00:00 2001 From: Akash Yadav <89795799+akki2104@users.noreply.github.com> Date: Sat, 7 Oct 2023 10:58:05 +0530 Subject: [PATCH] Create v5cgZN.go Signed-off-by: Akash Yadav <89795799+akki2104@users.noreply.github.com> --- HjOamA/v5cgZN.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 HjOamA/v5cgZN.go diff --git a/HjOamA/v5cgZN.go b/HjOamA/v5cgZN.go new file mode 100644 index 0000000..34fcf96 --- /dev/null +++ b/HjOamA/v5cgZN.go @@ -0,0 +1,22 @@ +package main + +import ( + "fmt" +) + +func main() { + var base, height float64 + + // Prompt the user for input + fmt.Print("Enter the base of the parallelogram: ") + fmt.Scan(&base) + + fmt.Print("Enter the height of the parallelogram: ") + fmt.Scan(&height) + + // Calculate the area of the parallelogram + area := base * height + + // Display the result + fmt.Printf("The area of the parallelogram with base %.2f and height %.2f is %.2f square units.\n", base, height, area) +}