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 engineering?
i am preparing for AAI JR EXECUTIVE exams so plz suggest the objective materail for preparation
We have 6.6 KV, 250 KW HT Motor and i want to run this motor with 250 KW LT Variable frequency drive. Is this Possible? How? what are the major modification required?
When do we need drive test?
What is the importance of peak inverse voltage?
what is the importance of signals and systems ?
What is schottky diode?
Explain the difference between dcs & plc & scada?
What is 74ls244?
What does the voltmeter in ac mode show?
i had cmpltd my diploma with 89% in ECE and i got call letter foe the interview of isro bengaluru which bks i hv ti prefer
What is meant by small signal amplifier?
What are the different types of flip-flops?
Explain why normally control terminal of 555 timer is connected to ground through a 0.01µf bypass capacitor?
Explain the operating condition in scr.