Friday, April 22, 2011

Lesson 8 Source Code

List of videos Lesson 8 Video
To get the full benefit of the lesson, watch the video Lesson 8: The cin statement NOTE: for a fast copy, follow these steps in order:
  1. Click anywhere in a text box below (result will be a blinking vertical line in the text box)
  2. Hit ctrl + A on the key board (the "ctrl + A" means hit Ctrl and A at the same time) (The result should be that all the text inside the text box lights up in blue)
  3. Hit Ctrl + C (Nothing significantly happens that is visible) and now its copied to the clipboard and your ready to paste it anywhere you wish

The cin statement
The cin statement allows the user to enter a value for x in this example notice that the cin.get() statement is replaced by the system("pause") because the cin.get() will not work once cin has been called. (i don't know why that is the case) Here is another example. Computers don't like to divide by zero, you can try to input 0 for y to see what happens or you can also find out what happens by watching the video.

3 comments:

  1. thanks for help...

    ReplyDelete
  2. Very good work! Great help to students.

    ReplyDelete
  3. dude ur vids on youtube is awesome i really really really really really really aprreciate it

    ReplyDelete