Thread: Funny situation!

  1. #1
    Registered User
    Join Date
    Sep 2008

    Funny situation!

    Hello all,

    Thank you for your time to read this post. I am a student who is stuck in a programing class that is far more advance than what i already know about programing. The drop date for this class is only two weeks after the first day of instruction. My teacher for C was gone on vacation for a week and a half, and on the last day to drop i thought threw the first day of him actually teaching i could handle the class. Long story short, i need to at least pass this class. I have taken intro to computer science but that is it. I know basically what programing dose for a computer and its programs but i have no clue as to how to write code.

    I do know some basic rules for writing code. Threw a series of unfortunate events i am stuck in this class. i cant drop due to being past to drop line. In my Intro to Computer Science class i worked with green foot. Its a small program that teaches basic ways to edit a picture with code. it was pretty much copy past and change a few numbers.

    Right now in class we are doing some basically math problem programming. An example is the home work i was assigned tonight. Write a program to convert decimal to Hexadecimal. Its a easy problem, but with no idea where to start in programing its like trying to dig 6 foot hole with your fingers.

    I have been basically Google searching answers to some questions that are extremely easy to do, but i don't have the tools. Can anyone point me to a book, video or anything that i can do to help teach my self programing in C. i am willing to spend a little money to get some instructing video or books. Thank you for your help.

    -C Stuck

  2. #2

  3. #3
    Registered User
    Join Date
    Oct 2006
    first, since you were able to register in the course it seems to mean that you (at least) met the prerequisites for the course. if this is the case, then you are no further 'behind' than your peers of that course. if you somehow got permission to get into the course without having the prerequisite, then of course it will be much more difficult. if you work hard and consistently then you will be fine, though.

    the cliche program to start with is to look up and examine the code (and explanations) of a "hello world" for the C programming language. if you have never written a program in C before then you definitely need to start with this. there is a tutorial on this site ( i think) that can introduce you to variables and the basic arithmetic operators.

    for this assignment you will need knowledge of "int"eger variables, console input, console output, math operators, and some control structors like "if" or maybe loops like "while". this assignment can be solved using a built-in standard C function with 1 statement, but i imagine this is not what your teacher is looking for.

    after you have this basic knowledge, you will need to learn the basics of what the decimal and hexadecimal number systems are (if you dont already, you may have learned that already in your intro CS course).

    with all of this knowledge, then, try and work out on paper how to convert a decimal number to a hex number. pretend it is like a recipe for baking a pizza: what are the specific and explicit ingredients (variables) and instructions (C logic), in order of course, just like a recipe. for example, try and convert the decimal number 50 into a hexidecimal number, using a systematic approach. try this approach for other numbers, such as 509 and 7. you will need a general approach (algorithm) that will work for all of these numbers.

    the process of coming up with this on paper is the hardest part (which you need to do); also notice that this has nothing to do with computers or programming! once you have that, tell us what youve come up with (yes, in basic english). we then can pretty much give you the equivalent code that translates (but wont :P). what you have on paper will be close to a one-to-one relation to the code you write, if done properly (of course excluding those silly "#include" things, etc).

    let us know what you come up with. good luck!

    edit: whatever operating system your using (ie windows xp), it will have a calculator that you can use to convert decimal numbers to hex and vice-versa. use this to test your paper work.
    Last edited by nadroj; 09-15-2008 at 09:34 PM.

  4. #4
    Registered User
    Join Date
    Sep 2008
    i'm in a similar situation where i have to take this class to graduate, except i'm trying to learn the language before the class starts since i have no experience, so basically i'm on my own with the book.

    to my surprise i have not found it very confusing at all, and the math programming seems to be very logical. the book that's gotten me this far is called "A First Book of ANSI C" by a guy named Bronson. in my extremely limited experience, i'd recommend it.

    Good luck

  5. #5
    Registered User
    Join Date
    Sep 2008
    wow that tutorial is extremal help full, thanks! i like the quizzes and easy step by step to get a grasp of the whole idea behind programming.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Funny Windows Error Codes (I rofled...)
    By Sentral in forum A Brief History of
    Replies: 10
    Last Post: 06-01-2006, 09:38 AM
  2. Object Oriented - Funny story
    By MethodMan in forum A Brief History of
    Replies: 5
    Last Post: 09-26-2002, 02:21 PM
  3. Funny Programming Website
    By MethodMan in forum A Brief History of
    Replies: 1
    Last Post: 09-13-2002, 10:59 PM
  4. Absolutely mind bogglingly funny
    By Imperito in forum A Brief History of
    Replies: 1
    Last Post: 09-06-2002, 09:23 PM
  5. For some reason, it prints funny characters ???
    By Nutshell in forum C Programming
    Replies: 8
    Last Post: 01-14-2002, 03:27 PM
Website Security Test