Thread: just give an idea not code

  1. #1
    Registered User
    Join Date
    Mar 2014
    Posts
    95

    just give an idea not code

    i want just idea not code. i can write nothing. please give me an idea which can be followed and been helpful thank you.
    Code:
    Sample Run 1:Please enter 4 2D points:
    1.0 1.0
    2.0 1.0
    3.0 1.0
    5.5 5.0
    Your points can construct:
    A triangle
    Sample Run 2:
    Please enter 4 2D points:
    1.0 1.0
    2.0 1.0
    3.0 1.0
    5.5 1.0
    Your points can construct:
    A line
    Sample Run 3:
    Please enter 4 2D points:
    1.0 1.0
    2.0 1.0
    3.0 6.0
    5.5 5.0
    Your points can construct:
    A quadrilateral

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    You didn't give the specific instructions of the assignment. Start with that. Before you even start to write code, plan the program (preferable on paper) so you have a framework to start with.

    Then start building up your program gradually. Start with something that prints prompts, reads input into a 2D array, and prints out the array. Compile and test this.

    Then create a function (perhaps called something like "find_shape()"), pass the 2D array to it, and print it out from within that function. Compile and test this.

    At that point, you can start filling in the logic required to determine shapes based on the points that have been entered, which should have been figured out in the first step ("plan the program").

    Build up the program bit by bit - see here for an example: A development process

    If you get stuck, post your code, the problem(s) you're having, and specific question(s). Then we will be in a better position to help you.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 03-12-2011, 02:10 AM
  2. plz give an idea about this project
    By vpshastry in forum C Programming
    Replies: 1
    Last Post: 11-10-2009, 07:57 AM
  3. give me some idea..
    By rothj0hn in forum C Programming
    Replies: 7
    Last Post: 02-04-2006, 06:07 AM
  4. Give an idea of finding different letters in the string
    By gtr_s15 in forum C++ Programming
    Replies: 10
    Last Post: 12-03-2005, 06:00 AM
  5. Just to give you an idea of what we're going through...
    By rick barclay in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 09-13-2001, 02:09 PM