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
What is a volatile keyword in c?
What are the benefits of c language?
What is graph in c?
What is difference between function overloading and operator overloading?
Where we use clrscr in c?
What is the difference between variable declaration and variable definition in c?
Explain the properties of union.
please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com
Explain how can a program be made to print the line number where an error occurs?
How can I open files mentioned on the command line, and parse option flags?
Describe wild pointers in c?
What is the value of h?
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
What are the types of assignment statements?
When a c file is executed there are many files that are automatically opened what are they files?