write down a program in java to print the above pattern
Attachments:
Answers
Answered by
0
Answer:
public class pattern {
public static void main(String[] args) {
int n = 5;
int p = 65;
for(int i=0;i<n;i++)
{
for(int j=n-1;j>i;j--)
{
System.out.print(" ");
}
for(int k=0;k<=i;k++)
{
System.out.print((char)(p-k));
}
p++;
System.out.println();
}
}
}
Similar questions
Math,
5 months ago
English,
9 months ago
Political Science,
9 months ago
Social Sciences,
9 months ago