Computer Science, asked by Anonymous, 1 year ago

I
IC
ICS
ICSE
ICS
IC
I

print this series using java.


Anonymous: are kis liye block ki woh toh batao
Anonymous: are unblock kar dongi
Anonymous: 26 mar ko kar dungi
Anonymous: bye
Anonymous: ab to tuje unblock nahi kar sakti time nahi hai
Anonymous: and kal mera mood karab ho gaya tha
Anonymous: esliye ho gaya
Anonymous: sorry
Anonymous: bye bestii
Anonymous: going now

Answers

Answered by siddhartharao77
7
Class Demo
{
public static void main(String[] args)
{
String s = "ICSE";
for(int i=0;i<4;i++)
{
for(int j=0;j<=i;j++)
System.out.println(s.charAt(j)+" ");
System.out.println();
}
for(int i=4;i>=1;i--)
{
for(int j=1;j<i;j++)
{
System.out.println(s.charAt(j-1)+" ");
}
System.out.println();
}
}
}


Hope this helps!Good Luck.

Anonymous: good bro
siddhartharao77: Thanks bro. This is a very interesting program.
siddhartharao77: Thanks for the brainliest bro
Anonymous: no problem bro
Answered by Anonymous
2

Answer:

Class Demo

{

public static void main(String[] args)

{

String s = "ICSE";

for(int i=0;i<4;i++)

{

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

System.out.println(s.charAt(j)+" ");

System.out.println();

}

for(int i=4;i>=1;i--)

{

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

{

System.out.println(s.charAt(j-1)+" ");

}

System.out.println();

}

}

}

Explanation:

Similar questions