Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d03c65c

Browse files
🍵
1 parent 58d1c84 commit d03c65c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

‎challenge8.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import java.util.Scanner;
2+
3+
// Create a program to calculate the area of a traingle.🚀
4+
public class challenge8 {
5+
public static void main(String[] args) {
6+
Scanner input = new Scanner(System.in);
7+
System.out.println("Calculate area of a traingle");
8+
System.out.print("Enter Breadth: ");
9+
int breadth = input.nextInt();
10+
System.out.print("Enter Height: ");
11+
int Height = input.nextInt();
12+
int aot = (1/2*(breadth*Height));
13+
System.out.println("Result is: " + aot);
14+
}
15+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /