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 an lvalue?

1063


How can I call fortran?

1043


application attempts to perform an operation?

1976


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

2126


Why is it usually a bad idea to use gets()? Suggest a workaround.

1786


What are the different types of pointers used in c language?

1047


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

1163


What is the right type to use for boolean values in c?

1032


What is the purpose of void in c?

1067


What are different types of variables in c?

1069


Are global variables static in c?

1167


What is the method to save data in stack data structure type?

1087


How does selection sort work in c?

1039


Explain what are the different file extensions involved when programming in c?

1110


What is register variable in c language?

1029