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 2
3 3 3
4 4 4 4
5 5 5 5 5

Answer Posted / lohith

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();

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

Is This Answer Correct ?    43 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are all header files not declared in every c program?

1109


What are the disadvantages of a shell structure?

1355


Explain function?

1097


Differentiate call by value and call by reference?

981


application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above

1073


Can we compile a program without main() function?

1132


Is c++ based on c?

1081


What is nested structure in c?

1073


Explain how do you use a pointer to a function?

1116


What is the difference between struct and typedef struct in c?

1129


What are the restrictions of a modulus operator?

1129


Are c and c++ the same?

1061


write a program for the normal snake games find in most of the mobiles.

2265


swap 2 numbers without using third variable?

1141


What are the advantages and disadvantages of a heap?

1218