Thread: Assignment

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

    Wink Assignment

    can you help me solve this question ? ,Write a C program that takes the length and width then output a rectangle, the rectangle board must be * and filled with #. (this question must be solved using loops). (Thank you )

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,248
    Yes.

    Now, what have you tried? If I were you, I would start by hardcoding either the length or width, and then try to write a loop to draw a single column or row. Once I've done that and tested to see it works as expected, I would hardcode the other input and write more code (i.e., a loop), to draw the whole rectangle. With that done, I would then change the hardcoding of length and width into code that requests for input and reads it.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with Assignment
    By RenegadeTimmy in forum C Programming
    Replies: 17
    Last Post: 04-02-2011, 02:48 PM
  2. Car assignment help
    By anik18 in forum C Programming
    Replies: 4
    Last Post: 05-09-2009, 09:40 PM
  3. Replies: 3
    Last Post: 04-26-2009, 08:54 AM
  4. help with assignment
    By robasc in forum C# Programming
    Replies: 7
    Last Post: 04-18-2005, 12:02 AM
  5. I need some help with an assignment
    By AtmaSniper in forum C++ Programming
    Replies: 9
    Last Post: 02-13-2005, 11:27 AM

Tags for this Thread