answersLogoWhite

0


Best Answer

import java.io.*;

public class Wave{

public static void main (String args[])throws IOException{

BufferedReader dataIn = new BufferedReader (new InputStreamReader(System.in));

String aa;

int type, wave, ctr, ctr2 ;

System.out.println("Select wave Type (1 or 2) : ");

System.out.println("Input wave type: ");

aa = dataIn.readLine();

type = Integer.parseInt(aa);

String cc;

System.out.println("How many number of waves do you want?");

System.out.println("Input wave count: ");

cc = dataIn.readLine();

wave = Integer.parseInt(cc);

while(wave>0){

for (ctr=0; ctr<=6; ctr++){

for (ctr2=0; ctr2<=ctr; ctr2++){

System.out.print("*");

}

System.out.print("\n");

}

if(type == 2){

for(ctr=6; ctr>0; ctr--){

for(ctr2=ctr; ctr2>0; ctr2--){

System.out.print("*");

}

System.out.print("\n");

}

}

wave--;

}

}

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How many miles is the land border of Florida?
Write your answer...
Submit
Still have questions?
magnify glass
imp