FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
javaprogram/Star Pattern in Java at master · devesh-dev/javaprogram · GitHub
devesh-dev
javaprogram
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
javaprogram
/
Star Pattern in Java
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (21 loc) · 457 Bytes
Breadcrumbs
javaprogram
/
Star Pattern in Java
Copy path
File metadata and controls
21 lines (21 loc) · 457 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public class RightTrianglePattern
{
public static void main(String args[])
{
//i for rows and j for columns
//row denotes the number of rows you want to print
int i, j, row=6;
//outer loop for rows
for(i=0; i<row; i++)
{
//inner loop for columns
for(j=0; j<=i; j++)
{
//prints stars
System.out.print("* ");
}
//throws the cursor in a new line after printing each line
System.out.println();
}
}
}
Back
|
FazBrowse Home
|
New Git URL