Hey i am outta my wits to get the folowing output in C. Can ne1 help

O/p reqd:

1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1

and so on.

see th pyramid is not the desired one when you open this post.go back and just move the mouse pointer on the post to find out the pyramid i wnt. thnks

*Puts on old school Narue hat*

>Can ne1 help
No, you're beyond help. If you had done even a simple search, you would have found approximately a metric shitload of posts asking exactly the same question and getting a complete answer for any variation of cluelessness you might be able to come up with.

As much as I love answering the same question over, and over, and over, and over, and over, for 7+ years, I'm going to have to ask you to search the freaking forum!.

If you have any further questions, comments, or suggestions, feel free to post them where they can be most useful: /dev/null.

eek :icon_eek:


but yeah... i think i just answered a C pyramid question right here in this very forum, like 4 days ago.


.

>but i see you're still wielding a chainsaw.
Indeed. The old Narue is still sitting just under the surface. I imagine if I ever decide to leave the moderation team I'll have an excuse to stop being so nice.

>eek
Yea, that's why everyone keeps saying I've mellowed out. ;)

Silly people, don't they know volcanoes. At anytime they can erupt again. It is in their nature.

the following attached programe can be your problems solution.........

Attachments
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
 int i,j,k,l;
 clrscr();
 for(i=1;i<=4;i++)
  {
   k=0;
   for(j=1;j<=i;j++)
   {
   k++;
   printf("%d ",k);
   }
   for(l=1;l<=i-1;l++)
   {
    printf("%d ",k-1);
   k--;
  }
 printf("\n");
 }
 getch();
 }
This article has been dead for over six months. Start a new discussion instead.