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
What is the zener breakdown?
What types of inverters require feedback diodes?
How the active power factor correction changes the wave shape of current drawn by a load to improve the power factor?
What does the pinch off voltage refers to in a mosfet?
Why silicon and germanium are the two widely used semiconductor materials?
For 65hp motors how kvr capacitor should be on??
What is meant by bidirectional or half-wave ac voltage controller?
State and explain some of p-n junction diode applications.
Define hybrid parameter?
Tell me in a mosfet, what does the pinch off voltage refers to?
What is snubber circuit?
define drain resistance
What are the advantages of bjt?
Write down the characteristics of digital ics?
what is voltage drop?