Thread: C Programming Starter Help

  1. #1
    Registered User
    Join Date
    Dec 2016
    Posts
    1

    C Programming Starter Help

    Completely new to programming trying to understand how to solve this question.

    You are to write a short C program. That will input a number between 1 and 50. Make sure the user only enters a number in that range. Then display a TRIANGLE of ASTERISKS with that number of rows. For example, say the user enters the number 10.


    Using Visual Studio for class

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    http://cboard.cprogramming.com/announcement.php?a=39

    Show some work or you will be ignored!

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #3
    Old Fashioned
    Join Date
    Nov 2016
    Posts
    137
    The first step is this taking that little paragraph and translating it into requirements. Some people call these use cases or user stories, others just call them requirements:

    1. You're going to have to printf a statement asking a user for a number between 1-50.
    2. You will then have to check that variable (if statement) to see if it is between 1-50.
    3. You're going to use some loops to display the asterisks based upon the number that the user enters.


    As the prev poster mentioned, I don't want to do your work for you, but you better get used to extracting out requirements like this if you plan on writing code for anyone else.

    Also, note that there are other things you may want to add in to make it "nicer," I just gave you a VERY BASIC guideline, because that's all you gave us and that's all I really care to write until you show some work.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 10
    Last Post: 12-10-2011, 02:04 PM
  2. Starter
    By SlashX1896 in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 09-14-2007, 11:30 AM
  3. Here's your starter for three...
    By SMurf in forum Windows Programming
    Replies: 1
    Last Post: 08-06-2003, 08:12 AM
  4. Game Starter?
    By CammoDude91 in forum C++ Programming
    Replies: 20
    Last Post: 07-27-2003, 02:24 PM
  5. Game programming starter kit 4.0...
    By Leeman_s in forum Game Programming
    Replies: 7
    Last Post: 10-31-2001, 09:51 PM

Tags for this Thread