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 type of waves exactly the radiations are ?
Pls tell me when will coming ssc scientist assistant result...how many marks for elgilibity.. Am a minority girl oc
What are the popular ic packages available?
Where are the successive approximation type adc’s used?
"11101111" when that bit oriented message transmitting from sender to receiver.how is it calculate parity bit and how is it show bit stream that would be transmitted..by even parity error detection scheme..pls send me an answer..very important,,
Define what is point contact diode?
I am abscent to the external exam due to illness then what happen
Explain why the input impedance of op-amp is so high?
Insights of tri-state inverters?
Please send RRB section engineer's signal paper of past 20 years.This is very urgent.I am giving section engineer exam this syear
What are the key inputs and factors considered to plan the number of SGSN/GGSN if you have to set up a Greenfield network?
What are the limitations of the basic integrator circuit?
charge at rest result in e.f and charge in motion result in m.f then how can an accelerated charge give rise to emf wave? then there should be no e.f due to acc charge as it rise from charge at rest?
What happens when an ammeter is connected across the circuit?
what is the reason of RDI alarm in microwave link?