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
What is volatile variable how do you declare it?
What are the applications of c language?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
Explain what are preprocessor directives?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
What is the purpose of void in c?
In c language can we compile a program without main() function?
Explain what is the difference between a string and an array?
Is c dynamically typed?
Explain the use of bit fieild.
largest Of three Number using without if condition?
How to draw the flowchart for structure programs?
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
Write a code to generate a series where the next element is the sum of last k terms.