Pattern Program: #2

 

 Pattern Program: #2



OutPut: Using Do while Loop in Java


*** 

***

***

***

***

***      




class Demo {


public static void main(String[] args) {

int x,y;

for(x=1;x<=6;x++)

{

for(y=1;y<=3;y++)

{

System.out.print("*");

}

System.out.println();

}

}


}




OutPut: Using Do while Loop in C#

*** 

***

***

***

***

***    



class Demo {


public static void main(String[] args) {

int x,y;

for(x=1;x<=6;x++)

{

for(y=1;y<=3;y++)

{

Console.Write("*");

}

Console.WriteLine();

}

}


}



OutPut: Using Do while Loop in Python

*** 

***

***

***

***

*** 


for x in range(1,7,1):

    for y in range(1,4,1):

            print("*", end="")

    print(end="\n")







OutPut: Using Do while Loop in C

*** 

***

***

***

***

***    





void main(){

int x,y;

for(x=1;x<=6;x++)

{

for(y=1;y<=3;y++)

{

printf("*");

}

printf("\n");

}

}





OutPut: Using Do while Loop in C++

*** 

***

***

***

***

***    


void main(){

int x,y;

for(x=1;x<=6;x++)

{

for(y=1;y<=3;y++)

{

cout<< "*";

}

cout<< "\n";

}

}

For More Information visit my Official website: www.sateeshm.com

Comments