Computer Science, asked by shubhangi4231, 8 months ago

Write a java program to display the following pattern.
I
I C
I C S
I C S E​

Answers

Answered by mastermaths55
3

Explanation:

1)class Pattern

{

void main()

{

String s = "BLUEJ"

int n = s.length();

int i, j;

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

{

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

{

System.out.print( s.charAt(i) );

}

System.out.println();

}

}

}

2)import java.util.*

class Vowel

{

void main()

{

Scanner sn = new Sccanner (System.in);

System.out.println("Enter a string");

String s= sn.nextLine();

char ch;

int n, count =0;

n=s.length();

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

{

ch = s.charAt(i)

if ( ch=='A' || ch=='a' || ch=='E' || ch=='e' || ch=='I' || ch=='i' || ch=='O' || ch=='o' || ch=='U' || ch=='u')

{

count++;

}

}

System.out.println("Total number of vowels = " + count);

}

}

mark as brainliest answer me and

3)import java.util.*

class Replace

{

void main()

{

Scanner sn = new Scanner (System.in);

System.out.println("Enter string in lower case");

String s = sn.nextLine();

s=s.toLowerCase();

System.out.println( s.replace(e,*) );

}

}

Similar questions