Skip to content

Instantly share code, notes, and snippets.

@saqibmehmoodgit
Last active December 17, 2021 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saqibmehmoodgit/e4106768f86a2d8c2385a1bda31b6d06 to your computer and use it in GitHub Desktop.
Save saqibmehmoodgit/e4106768f86a2d8c2385a1bda31b6d06 to your computer and use it in GitHub Desktop.
System.out.print("Write once, run everywhere!");
String[] array = {"Write","once,","run","everywhere!"};
for(int k = 0; k<=array.length-1; k++)
{
if(k==0)
{
System.out.println();
for(int k3 = 0; k3<=array.length-1; k3++)
{
System.out.println(array[k3]);
}
for(int j = 0; j<=31; j++)
System.out.print("*");
}
else if(k==1)
{
System.out.println("");
System.out.print("* ");
for(int k3 = 0; k3<=array.length-1; k3++)
{
System.out.print(array[k3]+" ");
}
System.out.println("*");
System.out.println("* *");
}
else if(k==2)
{
for(int k3 = 0; k3<=31; k3++)
{
System.out.print("*");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment