Like Tree7Likes
  • 2 Post By anduril462
  • 1 Post By Salem
  • 1 Post By CommonTater
  • 3 Post By quzah

Digits pyramid printing programs needed in C Programming

This is a discussion on Digits pyramid printing programs needed in C Programming within the C Programming forums, part of the General Programming Boards category; write a program that prints the following pattern Code: 5 4 5 4 3 4 5 4 3 2 3 ...

  1. #1
    Registered User technoexam's Avatar
    Join Date
    May 2011
    Location
    India
    Posts
    8

    Exclamation Digits pyramid printing programs needed in C Programming

    write a program that prints the following pattern
    Code:
            5
                             4 5 4
                          3 4 5 4 3
                       2 3 4 5 4 3 2 
                    1 2 3 4 5 4 3 2 1
    Last edited by technoexam; 10-01-2011 at 01:36 PM.

  2. #2
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,640
    Ok. Done.

    Now it's my turn: Read the homework policy and forum guidelines. Make an effort on your problem, post your code in code tags, and ask a specific question. Then you might get a real answer, instead of some smart a s s response.
    Salem and quzah like this.

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,765
    @technoexam
    You really ought to take your website off-line until you actually know something about the subject.
    It is obsolete and wrong in pretty much equal measure.
    rags_to_riches likes this.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by technoexam View Post
    write a program that prints the following pattern
    ..No.. I don't want to.


    EDIT: Salem... you're right... the code and information on that website is way out of date...
    quzah likes this.

  5. #5
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,652
    It's perfectly logical for the backwards-azz plurality (at least) of developers in his native country.

  6. #6
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by rags_to_riches View Post
    It's perfectly logical for the backwards-azz plurality (at least) of developers in his native country.
    Sadly, he might even be seen as a teacher or benefactor over there....

  7. #7
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,509
    Quote Originally Posted by rags_to_riches View Post
    It's perfectly logical for the backwards-azz plurality (at least) of developers in his native country.
    Quote Originally Posted by CommonTater
    Sadly, he might even be seen as a teacher or benefactor over there....
    Just because of a few... err.. few thousand trolls... you can't say that !!
    There are plenty of people here left on the light side of the force .
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  8. #8
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    @Monasij... No argument, there's plenty of smart and modern people in India...
    However, that doesn't mean the backwards ones get a free pass.

    As they say: "Corruption exists only by grace of silence from the masses."

  9. #9
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by technoexam View Post
    write a program that prints the following pattern
    Code:
            5
                             4 5 4
                          3 4 5 4 3
                       2 3 4 5 4 3 2 
                    1 2 3 4 5 4 3 2 1
    I know, I know, I shouldn't give out free code. I just can't help myself today.
    Code:
    #include<stdio.h>
    int main( void )
    {
        printf(
    "5\n"\
    "                         4 5 4\n"\
    "                      3 4 5 4 3\n"\
    "                   2 3 4 5 4 3 2 \n"\
    "                1 2 3 4 5 4 3 2 1\n"
        );
        return 0;
    }

    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C Programming Help - 'return' & digits in a number
    By jamestgarner in forum C Programming
    Replies: 12
    Last Post: 10-11-2006, 03:27 AM
  2. Printing a specific number of digits
    By JizJizJiz in forum C++ Programming
    Replies: 4
    Last Post: 06-28-2006, 09:14 PM
  3. What software is needed to write internet based gaming programs
    By grumpomatic in forum Game Programming
    Replies: 8
    Last Post: 11-26-2005, 10:49 PM
  4. Printing 2 digits
    By sjalesho in forum C Programming
    Replies: 2
    Last Post: 11-02-2003, 03:14 PM
  5. help on console programs needed
    By thrice in forum C++ Programming
    Replies: 2
    Last Post: 07-26-2003, 06:32 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21