Computer Science, asked by areen98, 9 months ago

*
* *
* * *
* * * *
write a program to write the program and print it...





Answers

Answered by Bᴇʏᴏɴᴅᴇʀ
13

Answer:-

• Program in JAVA for the above code:-

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

public class Patt

{

public static void main(String args[])

{

int i, j;

for(i=1; i<=5; i++) //outer loop for number of rows[n]

{

for(j=1; j<=i; j++) //inner loop for spaces

{

System.out.print("*"); //to print "*"

}

System.out.println();

}

}

}

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Note:-

Refer to the Attachment for Output.

Attachments:
Answered by gaganadithyareddy9
2

Answer:

Hey! this is in python...

for i in range(3):

for j in range(3):

print('*', end=' ')

print()

Similar questions