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 / letskools

I think th correct program is this for the above output
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();

for(i=0;i<=5;i++)
{
for(j=i;j<=5;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1054


How do you override a defined macro?

1210


What is the use of a static variable in c?

1010


write a program to generate address labels using structures?

4524


What is table lookup in c?

1037


Explain built-in function?

1093


Is there a way to compare two structure variables?

1060


What is the difference between union and structure in c?

1088


What are the types of type specifiers?

985


What is c language and why we use it?

1005


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

1198


What is the difference between text files and binary files?

1286


Differentiate between full, complete & perfect binary trees.

1055


How can I make sure that my program is the only one accessing a file?

1195


Why does everyone say not to use scanf? What should I use instead?

1368