Thread: How to write pattern programs?

  1. #1
    Registered User
    Join Date
    Aug 2015
    Posts
    75

    How to write pattern programs?

    hi all
    i want to print pattern programs.i google but i dont understand whats the logic of this program. what is the easy way to remember such programs. where to start from?

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Quote Originally Posted by san12345 View Post
    hi all
    i want to print pattern programs.i google but i dont understand whats the logic of this program.
    What do you mean by "pattern program"?

    Quote Originally Posted by san12345 View Post
    what is the easy way to remember such programs.
    The idea is to develop your problem-solving skills, not your memory. This way, each time you encounter a problem, you'll be equipped to solve it yourself.

    Quote Originally Posted by san12345 View Post
    where to start from?
    I always start with:

    Code:
    #include <stdio.h>
    
    int main(void)
    {
    
    
        return 0;
    }

  3. #3
    Registered User
    Join Date
    Aug 2015
    Posts
    75
    i cant write here but you can see this link Number Patterns - Program in C
    there are so many pattern programs but they didnt explain any of them
    can you explain me how the code works?

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    I suggest you pick one pattern to start with. Do not bother looking at the code. Instead, sit down with a pencil and paper and try to work out the logic yourself on how to get that output. Break the solution down into little discrete steps. Once you understand the logic in this way, converting it to code should be trivial.

    As has already been explained in another thread, telling you how code works will not learn you anything. You need to go through the process yourself.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Start with the first one, then work your way through the list.

    Yes, the first few will be quite hard.

    But as your skill develops, they will get easier.

    You do want to actually be a programmer don't you, and not just put up a good talk in social settings.
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to write programs for PWM in C ?
    By dumbster in forum C Programming
    Replies: 8
    Last Post: 10-31-2012, 03:23 AM
  2. how to write programs in pelles c??
    By Abhas in forum C Programming
    Replies: 13
    Last Post: 04-11-2011, 12:32 AM
  3. Reroute where programs write to
    By willc0de4food in forum C Programming
    Replies: 7
    Last Post: 09-21-2005, 04:48 PM
  4. Possible to write adaptive programs?
    By crag2804 in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 06-16-2003, 04:35 PM
  5. Write a program that prints a pattern of asterisks?
    By Basia in forum C Programming
    Replies: 2
    Last Post: 06-01-2002, 05:56 PM