how can i get the output
54321
4321
321
21
1

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

Answer Posted / rishabh upadhyay

#include<stdio.h>
void main(){
int i,j=5,temp=0;
for (i=1;i<=5;i++)
{
for (j=5-temp;j>=1;j--)
{
printf("%d",j);
}
printf("
");
temp=temp+1;
}
}

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is c definition?

731


What is difference between structure and union in c?

529


What is data structure in c programming?

559


Define recursion in c.

686


How pointers are declared?

548






When should a far pointer be used?

587


What is #include cctype?

566


What is the difference between declaring a variable by constant keyword and #define ing that variable?

2672


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

736


How to explain the final year project as a fresher please answer with sample project

459


Explain #pragma statements.

589


Is it acceptable to declare/define a variable in a c header?

673


What are examples of structures?

578


Why isnt there a numbered, multi-level break statement to break out

571


Can we use visual studio for c?

534