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 f be used for both float and double arguments in printf? Are not they different types?

598


to find the closest pair

1812


What is structure padding in c?

615


What is bash c?

546


What is a structure member in c?

534






What are the different file extensions involved when programming in C?

736


What are variables and it what way is it different from constants?

769


Function calling procedures? and their differences? Why should one go for Call by Reference?

622


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

1873


What is break statement?

616


how do you programme Carrier Sense Multiple Access

1506


Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80

2539


Is swift based on c?

622


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

649


What is the function of multilevel pointer in c?

663