Printing letters using for loop

This is a discussion on Printing letters using for loop within the C Programming forums, part of the General Programming Boards category; ABCDEFGFEDCBA ABCDEF...FEDCBA ABCDE......EDCBA ABCD..........DCBA ABC...............CBA AB....................BA A........................A how to wirite the code using for loop in c? pls help????...

  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    1

    Printing letters using for loop

    ABCDEFGFEDCBA
    ABCDEF...FEDCBA
    ABCDE......EDCBA
    ABCD..........DCBA
    ABC...............CBA
    AB....................BA
    A........................A
    how to wirite the code using for loop in c?
    pls help????
    Last edited by arighnasarkar; 01-03-2011 at 12:50 AM.

  2. #2
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,292
    What have you tried?
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    I hate to do this one for you, but I can't resist.
    Code:
    #include<stdio.h>
    int main( void )
    {
        char *a[] = {
            "ABCDEFGFEDCBA",
            "ABCDEF...FEDCBA",
            "ABCDE......EDCBA",
            "ABCD..........DCBA",
            "ABC...............CBA",
            "AB....................BA",
            "A........................A",
            NULL
        };
        size_t x;
        for( x = 0; a[ x ]; x++ )
            puts( a[ x ] );
        return 0;
    }
    Let me know what grade you get.


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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 12-29-2010, 10:11 AM
  2. C# Printing Problem
    By silverlight001 in forum C# Programming
    Replies: 0
    Last Post: 03-23-2009, 01:13 AM
  3. generic printing preferences dialog box
    By stanlvw in forum Windows Programming
    Replies: 8
    Last Post: 06-27-2008, 02:20 AM
  4. need help relating printing?
    By omarlodhi in forum Linux Programming
    Replies: 0
    Last Post: 03-03-2006, 03:46 AM
  5. Printing with Color Letters
    By BigSter in forum C++ Programming
    Replies: 2
    Last Post: 11-28-2001, 10:42 PM

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