how do i write program like one shown
1234567654321
123456 654321
12345 54321
1234 4321
123 321
12 21
1 1
Answer Posted / amit
#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-1;j++)
printf(" ");
for(j=n-i;j>0;j--)
printf("%d",j);
printf("\n");
}
}
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Ripple as referred to in a rectifier circuit.
Explain the difference between microprocessor and micro controller?
Why thyristors are not preferred for inverters?
4 Stage ripple counter with delay(f/f) 10msec. How much time it takes for a state to change. 4*10=40.
What is the difference between race and race around condition
How is sio2 layer formed in a monolithic ic?
hi, This is manglam.I have done BE(E&TC). I have been selected for icici po interview on 7th sept.So what type of questions they may ask? If u have any interview questions , plz mail me(vickymanglam@gmail.com). are the gd topics always related with economics?
WHAT IS DIFFERENCE BETWEEN. WRITE: a+m(2). m = m + 1. + OF THESE TWO IN SAP ABAP
importance of defining tg or tf in selecting master and slave bts's?
Define negative frequency?
Name the modulation techniques.
Explain the different modes of buck boost converter
What is the tri state of a signal?
how profibus transfer data?
what is a random variable?