Answers for "what is the output of the java code snippet BABA....(pattern repeat)"

0

make pattern for V in jaca

void drowV(int hight){
    int rowLen = (hight-1)*2;

    for(int i=0; i<hight; i++){
        int start = i;
        int end = rowLen-i;
        for(int j=0;j<=rowLen; j++){
            if(j==end){
                System.out.println("*");
                break;
            }
            else if(j==start){
                System.out.print("*");
            }
            else{
                System.out.print(" ");
            }
        }
    }
}
Posted by: Guest on October-29-2020

Code answers related to "what is the output of the java code snippet BABA....(pattern repeat)"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language