Computer Science, asked by Anonymous, 1 year ago

write a java program

to print the following patterns
❤❤❤

Attachments:

Answers

Answered by utkarshmishra9819
0

Answer:

Buddy I have answered them with quite an effort typing on my phone.Hope you like it And follow me.

5:

class prog {void main(){

int g=1;int k=0;

for( int i=0;i>=0;j=j+g)

{

for(int j=0;j<=k;j++)

{System.out.print(" ");}

for (int q=k;q<=2;q++)

{System.out.print("*");}

System.out.println();

if(i==2)

{g=-1;}

k=k+g;}

}}

the fourth question is the same as tge above with limit just increased.

6:

class prog

{void main(){

int g=1;

for(int i=1;i>=1;i=i+g)

{

for(int j= 1;j<=i;j++)

{

System.out.print("*");

}

System.out.println();

if(i==3)

{g=-1;}

}

}}

Answered by dk505404
0

Answer:

go Kuhn bihh yyv ghbvy hbvy

Similar questions