Answer Posted / vignesh1988i
good question it is :
#include<stdio.h>
#include<conio.h>
void main()
{
int m;
char n,o;
printf("enter the no. of lines :");
scanf("%d",&m);
o='A';
for(int i=0;i<m;i++)
{
n='A';
for(int j=0;j<(m-i);j++)
printf("%c",n++);
for(j=0;j<i;j++)
printf(" ");
for(j=0;j<(m-(i+1));j++)
{
if(j==0||j==1)
{
n='A'+(m-2);
printf("%c",n);
}
else
printf("%c",--n);
}
printf("\n");
}
getch();
}
thnak u
| Is This Answer Correct ? | 10 Yes | 16 No |
Post New Answer View All Answers
Here is a neat trick for checking whether two strings are equal
What is the size of enum in c?
What are the two forms of #include directive?
What does the format %10.2 mean when included in a printf statement?
Explain the difference between call by value and call by reference in c language?
What are runtime error?
What is the value of uninitialized variable in c?
What is the function of this pointer?
What is the difference between c &c++?
What is a spanning Tree?
Write a program to swap two numbers without using the third variable?
Which is an example of a structural homology?
Explain About fork()?
Explain c preprocessor?
Explain what is output redirection?