Skip to content
This repository has been archived by the owner on Nov 10, 2021. It is now read-only.

aaryan078 #547

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@
|118 | Arghya Sahoo | arghyasahoo | <img src="./Photos/arghyasahoo.jpeg" width="100" /> | arghyasahoo.py | <img src="./Pattern_ScreenShots/arghyasahoo.png" width="100" /> | Techno International Newtown | [email protected] |
|119 |Shalini Agrawal |shaliniagrawal2512 |<img src="./Photos/shanuagrawal2512.jpg" width="100" /> |shaliniagrawal2512.cpp |<img src="./Pattern_ScreenShots/shliniagrawal2512.JPG" width="100" /> |IIIT Allahabad, UP |[email protected] |
|120 |Adrija Roy |adrija24 |<img src="./Photos/adrija24.jpeg" width="100" /> |adrijaroy24.c |<img src="./Pattern_ScreenShots/adrijaroy24.PNG" width="100" /> |BSTM, West Bengal |[email protected] |
|125 |Aaryan |aaryan078 |<img src="./Photos/aaryan078.jpeg" width="100" /> |aaryan078.java |<img src="./Pattern_ScreenShots/aaryan078.PNG" width="100" /> |KIIT,Odisha |[email protected] |
Binary file added Pattern_ScreenShots/aaryan078.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions Patterns/aaryan078.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import java.util.Scanner;
public class aaryan078
{
public static void main(String[] args)
{
int i, j, k, n;
Scanner sc = new Scanner(System.in);
System.out.print("Enter the number of rows you want to print: ");
n = sc.nextInt();
for (i= 0; i<= n-1 ; i++)
{
for (j=0; j<i; j++)
{
System.out.print(" ");
}
for (k=i; k<=n-1; k++)
{
System.out.print("*" + " ");
}
System.out.println("");
}
for (i= n-1; i>= 0; i--)
{
for (j=0; j<i; j++)
{
System.out.print(" ");
}
for (k=i; k<=n-1; k++)
{
System.out.print("*" + " ");
}
System.out.println("");
}
sc.close();
}
}
Binary file added Photos/aaryan078.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.