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

What is hungarian notation? Is it worthwhile?

1218


How to set file pointer to beginning c?

1203


i have a written test for microland please give me test pattern

2730


Explain the properties of union. What is the size of a union variable

1186


What are different types of variables in c?

1069


Is it better to use a macro or a function?

1158


Can the size of an array be declared at runtime?

1087


Is using exit() the same as using return?

1347


What are pointers? What are different types of pointers?

1137


Which header file is used for clrscr?

1053


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

2337


What is header file in c?

1068


Is null valid for pointers to functions?

1170


Explain logical errors? Compare with syntax errors.

1071


How can I trap or ignore keyboard interrupts like control-c?

1065