Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Create v5cgZN.go #1586

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions HjOamA/v5cgZN.go
Original file line number Diff line number Diff line change
@@ -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)
}