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

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

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of arrays are there in c?

1049


Explain Basic concepts of C language?

1161


what is uses of .net

1742


Define VARIABLE?

1172


Explain how to reverse singly link list.

1147


What does volatile do?

984


Simplify the program segment if X = B then C ← true else C ← false

3020


What are the different types of constants?

1077


Why is #define used?

1278


What is typedef?

1431


Can true be a variable name in c?

1045


What is a good way to implement complex numbers in c?

1053


Explain how does free() know explain how much memory to release?

1080


What is scanf_s in c?

1125


What is the benefit of using an enum rather than a #define constant?

1244