hackingzo ne s.
co m
http://hackingzo nes.co m/?p=6228
Star Pattern(Rhombus) in java
import java.util.Scanner; class wo { int i,j,k,l,m,n; void wor() { System.out.println(enter no of line ); Scanner s1=new Scanner(System.com); n=s1.nextInt(); f or(i=1;i<=n;i++) { f or(k=1;k<=n-i;k++) { System.out.print( ); } f or(j=1;j<=i;j++) { System.out.print(*); } f or(l=2;l<=i;l++) { System.out.print(*); } System.out.print(\n); } f or(i=1;i<=n;i++) { f or(k=1;k<=i-1;k++) { System.out.print( ); } f or(j=i;j<=n;j++) { System.out.print(*); } f or(l=i+1;l<=n;l++) { System.out.print(*); } System.out.print(\n); } } } public class Star_Pattern { public static void main(String[] a) {
wo wobj=new wo(); wobj.wor(); } }
Relat ed Post
SHA1 Hash generating program in java MD5 Hash generating program in java Java Program to Find Network Interf ace Java Program to f ind Your IP Address and LoopBack Address Shif t Operator Program in Java Enter your email address:
Delivered by FeedBurner
Post Footer automatically generated by Add Post Footer Plugin f or wordpress.