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...

how can i make a program with this kind of output..

Enter a number: 5
0
01
012
0123
01234
012345
01234
0123
012
01
0

Answer Posted / vignesh1988i

#include<stdio.h>
#include<conio.h>
void main()
{
int m;
printf("enter the limit value :");
scanf("%d",&m);
for(int i=0;i<(2*n+1);i++)
{
printf("\n");
if(i<n)
{
for(int j=0;j<=i;j++)
printf("%d",j);
}
else
{
for(int k=0;k<=j;k++)
printf("%d",k);
j--
}
}
getch();
}

Is This Answer Correct ?    11 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of typedef in structure in c?

1007


What is the use of void pointer and null pointer in c language?

1167


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

2044


What is calloc() function?

1164


Suggesting that there can be 62 seconds in a minute?

1104


Explain the term printf() and scanf() used in c language?

1096


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

3742


Why does this code crash?

1145


What are the types of data structures in c?

1212


How to compare array with pointer in c?

1169


What is boolean in c?

1150


Why is c used in embedded systems?

1174


why return type of main is not necessary in linux

2151


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

2045


What is ambagious result in C? explain with an example.

2696