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
List the difference between a 'copy constructor' and a 'assignment operator' in C?
What is the full form of getch?
What is wrong in this statement? scanf(ā%dā,whatnumber);
how is the examination pattern?
show how link list can be used to repersent the following polynomial i) 5x+2
how logic is used
How to declare a variable?
What is int main () in c?
What language is c written?
What is const and volatile in c?
By using C language input a date into it and if it is right?
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
What is the need of structure in c?
What language is lisp written in?
What is the size of empty structure in c?