how can i get the output
54321
4321
321
21
1
in c programming........???? pls help......
Answer Posted / aftab rai
#include<stdio.h>
#include<conio.h>
main()
{
int i,j,n;
printf("enter numbers of lines");
scanf("%d",&n);
for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
{printf("%d",i+1+j);}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 3 Yes | 10 No |
Post New Answer View All Answers
Why can’t we compare structures?
What is the difference between local variable and global variable in c?
If you know then define #pragma?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
What are structural members?
How can you find out how much memory is available?
Explain void pointer?
Write a program to identify if a given binary tree is balanced or not.
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
What is openmp in c?
What is equivalent to ++i+++j?
What is a global variable in c?
Explain how are portions of a program disabled in demo versions?
What is the advantage of an array over individual variables?
How can I do serial ("comm") port I/O?