how do i write program like one shown
1234567654321
123456 654321
12345 54321
1234 4321
123 321
12 21
1 1
Answer Posted / cinu
#include<stdio.h>
int main()
{
int i,j,n;
printf("Enter no");
scanf("%d",&n);
for(i=0;i<=n;i++)
{
for(j=1;j<=n-i;j++)
printf("%d",j);
for(j=0;j<2*i;j++)
printf(" ");
for(j=n-i;j>0;j--)
printf("%d",j);
printf("\n");
}
}
Is This Answer Correct ? | 9 Yes | 6 No |
Post New Answer View All Answers
How to Create the Node file with 2 E1 (4+4+4) & EDAP.
what is the use of FR-4(flame retardant)in PCB design why dielectric material used in inner layer in PCB design technology??
What is meant by unidirectional or half-wave ac voltage controller?
How can a thyristor turned off?
What are the functions of base station system (bss)?
hi iam having b tech aggregate of 60%and 15 back locks cleared in course time and gre score of 1000 can i get visa
What are the applications of precision diode.
What is the duty cycle in on-off control method?
What is the difference between xdm 100, 300, 1000, 2000
what is difference between fiber otical cable and cat cable?
what is an inverting amplifier?
What is the work of Bus cable, Power cable and Er cable in nokia flexi edge bts.
Why vestigial side band is used in tv signal transmission?
What is memristor? How many modes it works? What is its advantage?
i have design dc-dc 3-way isolator circuit,how to test psrr,response time,limit frequency