Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
dimond of stars
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.Scanner; class Rextester { public static void main(String args[]) { Scanner in=new Scanner(System.in); int n; n=in.nextInt(); for(int i=1;i<=n;i++) { for(int j=1;j<=(n+1)-i;j++) { System.out.print(" "); } for(int k=1;k<=i;k++) { System.out.print("* "); } System.out.println(""); } for(int i=2;i<=n;i++) { for(int j=1;j<=i;j++) { System.out.print(" "); } for(int k=(n+1)-i;k>=1;k--) { System.out.print("* "); } System.out.println(""); } } }
run
|
edit
|
history
|
help
0
PE #4
// Java Coding Challenge - 06: Print out Fibonacci numbers 0 - 93
jb11.0 threads tick tock 1.0
JAVA # Klavyeden girilen cümlede kaç adet "a" harfi var
h
pattern2
JavaScript on Java's System.out.println()
javaClassAr2
AVL-GO-FLAT
1a