how can i get the output
54321
4321
321
21
1

in c programming........???? pls help......

Answer Posted / narasimharao

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,n;
clrscr();
scanf("%d",&n);
for(i=n;i>=1;i--)
{
for(j=i;j>=1;j--)
{
printf("%d",j);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    28 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I dynamically allocate arrays?

599


Where are c variables stored in memory?

601


what will be maximum number of comparisons when number of elements are given?

1413


How many types of operators are there in c?

623


What is the modulus operator?

742






What is the use of structure padding in c?

567


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

646


What is meant by preprocessor in c?

540


What is function in c with example?

635


What is signed and unsigned?

646


write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);

1850


Difference between linking and loading?

697


Can main () be called recursively?

633


How is pointer initialized in c?

589


What is the process to create increment and decrement stamen in c?

590