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

Write a program to find the biggest number of three numbers in c?

1095


how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....

1840


Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58

1573


Can you assign a different address to an array tag?

1211


Explain how do you print an address?

1205


Differentiate between static and dynamic modeling.

1185


What is a program?

1336


What is variables in c?

1096


Difference between strcpy() and memcpy() function?

1209


How do c compilers work?

1199


Explain what are compound statements?

1102


what is stack , heap ,code segment,and data segment

2764


Explain Function Pointer?

1241


Write a code of a general series where the next element is the sum of last k terms.

1092


What is #define used for in c?

1110