codinasion-archive / codinasion-programme

An open source codebase for sharing programming solutions.
https://codinasion.vercel.app/programme
MIT License
62 stars 147 forks source link

Area of a trapezoid #501

Closed harshraj8843 closed 2 years ago

harshraj8843 commented 2 years ago

Title of article

Write a Java program that to compute area of trapezoid

Area of a trapezoid = ( base 1 + base 2 ) * height / 2

Example:

Base 1 = 5, Base 2 = 10, Height = 7

Area of the trapezoid = (5+10)*7/2 = 52.5

Additional information

Base 1 : 5
Base 2 : 10
Height  : 7

Area : 52.5

Code of Conduct

Anzo52 commented 2 years ago

@harshraj8843 I'll give this a shot if you'd like. Did you just need a single class or a whole package? Also, should I just branch off main?

harshraj8843 commented 2 years ago

Hey @Anzo52

Thanks for contributing to this project 😃

Did you just need a single class or a whole package?

A single class

should I just branch off main?

You can create new branch from master

👍🏻

Anzo52 commented 2 years ago

@harshraj8843 Alrighty, I started a PR...I think I messed up somewhere in the flow though.

harshraj8843 commented 2 years ago

@harshraj8843 Alrighty, I started a PR...I think I messed up somewhere in the flow though.

Just move TrapezoidArea.java to programme/area-of-trapezoid