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 / jayaraj.s

#include <stdio.h>
main()
{
int a,b,i=1;
for(a=i;a<=5;a++)
{
for(b=a;b<=5;b++)
{
printf("%d",b);
}
printf("\n");
i++;
}
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pragma c?

1058


Explain zero based addressing.

962


Explain low-order bytes.

973


What is #line used for?

984


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1622


What are the types of pointers in c?

970


Explain what is page thrashing?

1052


Compare and contrast compilers from interpreters.

1073


What is a MAC Address?

1004


What is chain pointer in c?

1003


What is static identifier?

1160


What is a pragma?

1074


Write a program on swapping (100, 50)

1061


What math functions are available for integers? For floating point?

1075


can we change the default calling convention in c if yes than how.........?

2467