Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is a volatile keyword in c?

1165


What are the benefits of c language?

1183


What is graph in c?

1060


What is difference between function overloading and operator overloading?

1094


Where we use clrscr in c?

1141


What is the difference between variable declaration and variable definition in c?

1061


Explain the properties of union.

1087


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

1777


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

1223


How can I open files mentioned on the command line, and parse option flags?

1074


Describe wild pointers in c?

1119


What is the value of h?

1043


Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

1952


What are the types of assignment statements?

1069


When a c file is executed there are many files that are automatically opened what are they files?

1112