forked from rahul200106/hackoberfest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRectangle.java
More file actions
29 lines (27 loc) · 754 Bytes
/
Rectangle.java
File metadata and controls
29 lines (27 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// This code print a rectangle box.
// y AXIS = length of rectangle box.
// x AXIS = width of rectangle box.
// hacktober 2022 accpected
// code look iike this.
// hacktober 2022 accpected
// whan y AXIS is 4 and x AXIS 5.
// ******
// ******
// ******
// ******
import java.util.*;
public class Rectangle{
public static void main (String args []){
System.out.println("ENTER y AXIS VALUE");
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println("ENTER x AXIS VALUE");
int m = sc.nextInt();
for(int i=1; i<=n;i++){
for(int j=1; j<=m;j++){
System.out.print("*");
}
System.out.println();
}sc.close();
}
}