program for following output using for loop?
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5
Answer Posted / ep
#include <stdio.h>
int main()
{
for ( int i = 1; i <= 5 ; i++ ) {
for ( int j = i; j <= 5 ; j++ ) {
if ( i != j ) printf (" ");
printf( "%d", j );
};
printf("\n");
}
return 0;
}
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How can I sort a linked list?
What is a dynamic array in c?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
What are variables c?
What is the use of in c?
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
I need testPalindrome and removeSpace
#include
What does. int *x[](); means ?
What is output redirection?
Was 2000 a leap year?
What does %d do?
What is printf () in c?
Does c have circular shift operators?
which is an algorithm for sorting in a growing Lexicographic order
write a program to print largest number of each row of a 2D array