Like Tree5Likes

Help Needed On A Program

This is a discussion on Help Needed On A Program within the C Programming forums, part of the General Programming Boards category; Hey everyone, I recently started introduction to C and my professor gave us our first assignment and I have no ...

  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    56

    Post Help Needed On A Program

    Hey everyone, I recently started introduction to C and my professor gave us our first assignment and I have no idea where to start. I missed one day of class and I think it involves the material that I missed. So can you please read the instructions below and tell me where and how I should start? We are using Code:Blocks if you were wondering.

    Click Here

    Introduction: Arupís Getting Married!!!
    Arup got engaged this summer and now has been inundated with much more work than he anticipated in planning his wedding. He is in a bind and has decided that some C Programming skills could actually help him. In the following assignment, youíll write three programs to help him make some decisions for his wedding planning. Hopefully, your programs will save him some time so that he can spend enough time teaching classes and still have time leftover for some UCF football!!!

    I post the PDF document online because It will look like crap if I copy and Paste it.

  2. #2
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,058
    Do read our homework policy.

  3. #3
    Registered User
    Join Date
    Sep 2011
    Posts
    56
    I have read the Homework policy. I was just asking for help to try to explain this to me, I don't want you to do the assignment. I hope you get what I'm trying to say.

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    I assume you have some kind of lesson book? Open the book to the front, read until you reach the part that lets your mind figure out what to do in this problem.


    Quzah.
    Hope is the first step on the road to disappointment.

  5. #5
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,625
    Maaan, that professor is brilliant! Giving just enough info in order to get the job done. I like that he/she gives no code for help. And the little story behind the exercise if nice too.

    EDIT: So, what's your problem, young preProgrammer?

    EDIT^2: I changed me mind, he/she calls Code::Blocks "compiler".
    Last edited by GReaper; 09-07-2011 at 05:08 PM.
    stahta01 likes this.
    Devoted my life to programming...

  6. #6
    Registered User
    Join Date
    Sep 2011
    Posts
    56
    No we don't use a book, he just uses powerpoint presentation to teach.

    My Problem is at first when I read it I was clueless on what i'm supposed to do. As I stated, I missed one day of class because I had a job interview during that time and I think I missed some key points that day. Could you please try to explain what he's asking for and give me some tips on how to do it.

    I don't want you to give me the code line by line, it's just that I'm new to C and I just want to get good grades. I took a very basic programming in my freshman year in High School, we used Q Basic if you know what that is. But yea,

    If you want and can, would you email me because I don't get notifications once someone responds to this thread.

    Thanks
    Last edited by Salem; 09-12-2011 at 04:55 PM. Reason: snip email address

  7. #7
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Perspolice1993 View Post
    No we don't use a book, he just uses powerpoint presentation to teach.
    #1... Read my signature ... 4 simple steps. You haven't even tried step 1.
    #2... Get a book 'cause you ain't gonna learn nothin' from powerpoint slides.
    #3... Get a new teacher... one who actually knows about programming.

  8. #8
    Registered User
    Join Date
    Sep 2011
    Posts
    56
    Quote Originally Posted by CommonTater View Post
    #1... Read my signature ... 4 simple steps. You haven't even tried step 1.
    #2... Get a book 'cause you ain't gonna learn nothin' from powerpoint slides.
    #3... Get a new teacher... one who actually knows about programming.
    Yes, I read your signature. I agree with you 100%. Believe it or not I read it like 4 times already and I just don't know where to start.

    BTW could you please recommend a book to me? Some thing very effective and affordable. I have already spent over $500 on college books.

    And to answer your last line, I can't get a new teacher, the deadline has passed to drop or swap the course. He is actually very intelligent, he graduated from MIT. It's like he just taught us 2+2=4 but now he's asking us to find the derivative of ln(9x+4g(x)).

  9. #9
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,657
    Have you tried...oh, I don't know...talking to the professor or a TA about it? I mean, you are paying their salary to teach you. We get nothing out of this except satisfaction from the occasional student that actually wants to learn.

  10. #10
    Registered User
    Join Date
    Sep 2011
    Posts
    56
    The TA is only available on thursday and tuesdays. He told us not to email him, email the TA. I have emailed him, but haven't received a response yet. I just don't want to wait till the last minute to do it. And I didn't have to pay for the class, I got full ride to the school.

  11. #11
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    So take one problem and analyze it. What's the first problem about? Fitting tables in a box, with room around each table. Well that's just a simple math problem. Work it out on paper first, until you understand what steps you need to do to solve that. When you can solve it on paper, break down the solution into steps, and see what you need to make that happen in C.


    Quzah.
    Last edited by quzah; 09-07-2011 at 06:39 PM. Reason: missed some punctuation (if minor things like syntax/punctuation don't bug you, you're not a programmer)
    Hope is the first step on the road to disappointment.

  12. #12
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    So... sit down with a pencil and paper and analyse the problem until you understand how to do it manually...
    Then... working with your non-existent textbooks and your Compiler's documentation plan out how to solve the problem in code.
    Next... write the actual code to calculate the seating.
    Finally... test your program with different combinations of data to be sure it works.

    There isn't a programmer on this planet who can write code to solve a problem he doesn't understand...

  13. #13
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,676
    I highly doubt your teacher took you from 2+2=4 to the derivative of ln(9x+4g(x)). Maybe from 12+26=38 to 494+1377=1871. And besides, exercises that only cover what everybody already understands and can do without putting in any thought or effort are a waste of time (think how you would feel if your teacher actually asked you to do pages of single-digit addition problems). A big part of college and a CS degree is about you developing your analytic, problem solving and critical thinking skills, so you can tackle new, unknown problems, instead of just those that fit the template you've been taught.

    We don't even see int main(void), let alone you attempting to get input from the user. This is interpreted by us as laziness and do-my-work-for-me-ness, whether or not that's what you meant. Furthermore, we aren't here to teach you. There are an ungodly amount of tutorials on C programming all over the internet if you do a quick search (we even have some here: Cprogramming.com - Programming Tutorials: C++ Made Easy and C Made Easy).

    But you shouldn't even be trying to code anything yet, since it seems clear that you don't understand the problem. As Tater is wont to say, "There is no programmer anywhere who can code the solution to a problem they don't understand". You need to figure out how to solve this by hand first. Draw some pictures like in the assignment (graph paper may help here to keep things proportional). Look for patterns. What's the smallest room that can fit 1 table? What about the smallest room that can fit 1 table high by two tables wide? 3 tables wide? What about 2 tables high? 3? What happens if you make the room 1 foot wider? 2 feet? 3? How much do you need to increase the width or height by to ensure room for a new row or column of tables with room for seating? The assignment even gives you a sample problem with a correct answer. Work that out and don't stop until you get the correct answer, and know why and how your method works. Then, do several more practice problems with a pencil and paper.

    When you figure out how to do this by hand, most of the code should "fall into place". I'm not saying it will write itself in 10 lines, but the code for the solution will be much more obvious at that point. If you're still stuck, then you can post back with your code and specific questions, and get much better help.

    EDIT: Not only is he wont to say it, but he just did while I was writing this post!

  14. #14
    Registered User
    Join Date
    Sep 2011
    Posts
    111
    Quote Originally Posted by Perspolice1993 View Post
    BTW could you please recommend a book to me? Some thing very effective and affordable. I have already spent over $500 on college books.

    And to answer your last line, I can't get a new teacher, the deadline has passed to drop or swap the course. He is actually very intelligent, he graduated from MIT. It's like he just taught us 2+2=4 but now he's asking us to find the derivative of ln(9x+4g(x)).
    For a book, C programming books are fairly easy to find and are very cheap, since the language itself has not been updated in a while.

    The book we are using in my class is: The C Programming Language 2nd ED. by Kernighan & Ritchie ISBN: 0-13-110362-8.

    I would NOT recommend in purchasing that book from your school book store, nor would I recommend in purchasing a "new" copy. I would recommend a used copy, from a online site or a used book store in your area.

    Also, I would double check to see if calculus is a prerequisite for your class. If it isn't then asking you to use/perform calculus is very unreasonable.



    And if your TA is unavailable then go to the instructor. And at most schools it is standard policy to be available at the student's request. but remember they are humans and have a life outside of school. What that means is if their office hours do not work for you, then you can schedule another time outside of their hours to meet, example in the past I had a TA whoes office hours did not work with my schedule, a simple Email saying, due to other class scheduled I cannot go to your office hours, can we meet at such and such time (it also help to give your schedule), works almost all the time.
    Last edited by Strahd; 09-07-2011 at 07:25 PM.

  15. #15
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by anduril462 View Post
    EDIT: Not only is he wont to say it, but he just did while I was writing this post!
    LOL... It's MY line and I'll use it as I see fit!

Page 1 of 4 1234 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C Program solution needed...
    By vijay.neo in forum C Programming
    Replies: 6
    Last Post: 10-19-2006, 12:12 AM
  2. Some help needed with program.
    By ajdspud in forum C++ Programming
    Replies: 2
    Last Post: 12-06-2005, 03:36 PM
  3. Help needed with program.
    By ajdspud in forum C++ Programming
    Replies: 6
    Last Post: 11-22-2005, 04:05 PM
  4. Program crashes...help Needed!!
    By butterfly in forum C++ Programming
    Replies: 4
    Last Post: 05-31-2002, 12:22 PM
  5. redirection program help needed??
    By Unregistered in forum Linux Programming
    Replies: 0
    Last Post: 04-17-2002, 06:50 AM

Tags for this Thread


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