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
What is the value of uninitialized variable in c?
What is pointer to pointer in c?
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
Can we access array using pointer in c language?
What is a string?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
Describe the modifier in c?
Explain the red-black trees?
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol
What are types of structure?
What is masking?
How do I get a null pointer in my programs?
What is string function in c?
How can I implement sets or arrays of bits?
Explain what is wrong with this program statement?