C programming help, beginner

This is a discussion on C programming help, beginner within the C Programming forums, part of the General Programming Boards category; Hi guys, I'm currently self learning C programming by myself b/c I am unemployed. I have been using Microsoft Visual ...

  1. #1
    Registered User
    Join Date
    Mar 2013
    Posts
    1

    C programming help, beginner

    Hi guys,


    I'm currently self learning C programming by myself b/c I am unemployed. I have been using Microsoft Visual Studios to do exercises. So far I have been writing program exercises with printf as well as scanf to allow the user to add and subtract numbers.
    I am currently stuck on an exercise and would greatly appreciate help or tips given to me. The exercise is as follows:


    http://puu.sh/2ee5H




    Greatly appreciated for any help given to me.

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    If you were going to do this exercise by hand, you would probably want to work it out with paper and pencil, first. I'd suggest following that same idea with your program. Make a 2D char array[rows][cols], big enough to handle your letter. Now use loops and perhaps several if statements to put the letters into the right position, on the otherwise empty char array[][]. For loops give you the best way to have a loop, in this instance.

    Work it through by hand a time or two, and note the pattern of actions you take to complete this. Break it down into simple steps that don't rely on vision or other human only traits. Dividing the paper up into columns and rows, may help you see the relationship between when you are doing on the paper, with what you need to do in your letter array[][].

    When you're all done constructing your letter, just print out the entire letter array:
    Code:
    for(r=0;r<ROWS;r++) {
       for(c=0;c<COLS;c++) {
          printf("%c",letter[r][c]);
       }
    }
    And welcome to the forum, Mikey!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C programming beginner
    By rjreynolds in forum C Programming
    Replies: 4
    Last Post: 07-05-2010, 09:33 PM
  2. Beginner programming
    By Tigerdude in forum C Programming
    Replies: 4
    Last Post: 02-01-2005, 04:22 PM
  3. Windows programming for beginner (Absolute beginner)
    By WDT in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2004, 10:21 AM
  4. Beginner Programming Help
    By Beginner921 in forum C Programming
    Replies: 2
    Last Post: 02-03-2003, 01:31 AM
  5. C Programming Beginner Needs Help!!!
    By pauljones2k in forum C Programming
    Replies: 13
    Last Post: 12-03-2002, 01:48 PM

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