Computer Science, asked by dhonimsd7, 1 year ago

can someone help me print this pattern in java

Attachments:

siddhartharao77: (i) (or) (ii) - Which one...
dhonimsd7: ii

Answers

Answered by siddhartharao77
2
import java.util.*;

public class Pattern
{

public static void main(String[] args)
{

String name="ICSE";

int n = name.length();

int i,j;


for(i = 0; i<n; i++)

{

for(j = 0; j <= i; j++)

{

System.out.print(name.charAt(j));

}

System.out.println();

}

}

}



Hope this helps!

siddhartharao77: :-)
Similar questions