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 15443af

Browse files
🍵
1 parent 80bda62 commit 15443af

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

‎challenge7.java‎

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

0 commit comments

Comments
(0)

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