how do i write program like one shown
1234567654321
123456 654321
12345 54321
1234 4321
123 321
12 21
1 1
Answers were Sorted based on User's Feedback
Answer / swathi
we have to use nested for loops and also some predefined
functions which makes the cursor to jump to new location or
else \n,]b can be used in c pragram
| Is This Answer Correct ? | 8 Yes | 3 No |
Answer / 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 |
Answer / 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 |
WHAT IS ARROW DISPLAY IN TRANSISTOR SYMBOL DIAGRAM? IN NPN AND PNP BOTH?//
write a C programme to print all the strong numbers below 10000..
What are LAPD and LAPDm?
write a programme to identify the biggest number from the given three numbers with out using of relational operators
Explain conductivity, resistivity and resistance?
How is focussing achieved?
Draw the equivalent circuit of triac and diac.
Tell me about urself apart from your cv?
5 Answers Assurgent, Nihar Info Global,
What are the applications of comparator?
what is difference between voltage and potential?
WHICH TYPES OF QUESTION & WHICH BEST BOOK IN PREPARING FOR COMMUNICATION ?
In micro controller individual pin output current is 1.6ma .Normally to blink a led we need minium 10-12 ma. But if we connect led to the micro controller pins without additional device it blinks. How it is possible
Civil Engineering (5086)
Mechanical Engineering (4456)
Electrical Engineering (16639)
Electronics Communications (3918)
Chemical Engineering (1095)
Aeronautical Engineering (239)
Bio Engineering (96)
Metallurgy (361)
Industrial Engineering (259)
Instrumentation (3014)
Automobile Engineering (332)
Mechatronics Engineering (97)
Marine Engineering (124)
Power Plant Engineering (172)
Textile Engineering (575)
Production Engineering (25)
Satellite Systems Engineering (106)
Engineering AllOther (1379)