how can i get the output
54321
4321
321
21
1

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

Answer Posted / nagulmeera

#include<stdio.h>
#include<conio.h>
main()
{
for(int i=5;i<0;i--)
{
for(j=i;j!=0;j--)
{
printf("%d",j);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    4 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a method in c?

610


Why do we use namespace feature?

570


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

1725


Why do we use int main?

596


write a program to display all prime numbers

1446






How can a program be made to print the line number where an error occurs?

636


What is a macro in c preprocessor?

616


What is the benefit of using const for declaring constants?

574


How can I prevent another program from modifying part of a file that I am modifying?

602


What is a structural principle?

632


What is a volatile keyword in c?

627


What is n in c?

564


What is non linear data structure in c?

559


What is the use of bit field?

624


what will be the output for the following main() { printf("hi" "hello"); }

9293