Tuesday, April 15, 2008

C++ Revision

I added a Revision Exercise for my IT102/CS1201 students yesterday. Today, I've also uploaded the solutions to that exercise as well. You will be able to find the link to the solutions at the bottom of the Revision Exercise page.

Besides that, you can post any questions that you have regarding the C++ subject in the comments section at the end of this post. We can all use the comments feature here as a discussion board. Anybody can post questions as well as answer them, but try and keep your comments on-topic.

6 comments:

  1. Made a mistake in the Revision Exercise's Solutions - Question 9(a). Corrected it. Thanks for pointing that out, Sum Guo Shen.

    ReplyDelete
  2. SIR!! where is IT205 coursework coming out!? dont tell me maybe again..@_@ or i will go to 11th floor and jump down..hahah!!

    ReplyDelete
  3. Dear impatient Thila,

    Follow this IT205 Coursework marks link to the correct blogpost.

    ReplyDelete
  4. Sir, about the Revision Exercise question 3.

    the solution
    if (first >= 0 || second < 0)

    is it should be
    if (first >= 0 && second < 0)

    cuz if either one correct than will go to the else statment?

    ReplyDelete
  5. CK,

    The solution given is correct. The idea is like this:
    If the first number is not a negative number the error message will pop up.
    If the second number is a not a positive number the error message will also pop up.
    That means both first and second input MUST be correct. If both are correct, then the ELSE statement will execute and the calculations will ensue. Any mistakes in any of the input will result in the error message being displayed.

    ReplyDelete
  6. sir,

    question 10,

    C ) the answer should be

    cout sales[6][4] endl

    sales[5][3] <<- is the last column and row ?

    ReplyDelete