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

Write a program in c to print
1
121
12321
1234321
123454321

Answer Posted / vivek raghuwanshi

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,num;
cout<<num;
for(i=1;i<=num;i++)
{
for(j=1;j<i-1;j++)
{
cout<<" ";
}
for(k=1;k<i;k++)
{
cout<<k;
}
for(k=i;k>=1;k--)
{
cout<<k;
}
}
}

Is This Answer Correct ?    13 Yes 31 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

1135


In c language can we compile a program without main() function?

1061


write a program to print data of 5 five students with structures?

2009


What is a substring in c?

1000


What is meant by preprocessor in c?

953


What is the difference between typedef struct and struct?

1068


What do you understand by normalization of pointers?

1009


Who is the founder of c language?

1111


Is c high or low level?

968


What is const volatile variable in c?

986


What does a function declared as pascal do differently?

1045


Is there any possibility to create customized header file with c programming language?

1009


What does printf does?

1193


Is null valid for pointers to functions?

1111


What is d'n in c?

1074