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 do we use return in c?
I have seen function declarations that look like this
Why does the call char scanf work?
What is static memory allocation?
Why do we need volatile in c?
What is maximum size of array in c?
Why double pointer is used in c?
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
If the size of int data type is two bytes, what is the range of signed int data type?
Why do we use main function?
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
Explain the difference between strcpy() and memcpy() function?
What are the __date__ and __time__ preprocessor commands?
Can we compile a program without main() function?
Write a code on reverse string and its complexity.