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
English,
2 months ago
Math,
5 months ago
English,
10 months ago
Political Science,
10 months ago
Social Sciences,
10 months ago