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
Differentiate between a for loop and a while loop? What are it uses?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
Do string constants represent numerical values?
Write a code of a general series where the next element is the sum of last k terms.
In a switch statement, explain what will happen if a break statement is omitted?
Explain the use of 'auto' keyword in c programming?
What is header file definition?
How can I dynamically allocate arrays?
‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .
What is the difference between text files and binary files?
Explain the array representation of a binary tree in C.
How arrays can be passed to a user defined function
What is a pointer in c plus plus?
Why c is called top down?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.