
Exercise two February 7, 2006
1
Exercise 2
Exercise 2 –
–N
Numerical data
umerical data
types and simple input/ output
types and simple input/ output
Larry Caretto
Computer Science 106
Computing in Engineering
and Science
February 7, 2006
2
Outline
• Review exercise one (can hand in this
week as late assignment)
• Present assessment results
• Review lecture topics for exercise two
– Basic structure of simple C++ programs
– Basic input and output
• Instructions for preparing file to submit
• List tasks for exercise two
3
Review of Exercise One
• You should have learned how to use the
Visual C++ IDE to enter, compile, link,
and execute programs
• You saw a sample C++ program with
– A semicolon to end each statement
– Braces {} to separate blocks of code
– Use of cin >> and cout << for keyboard
input and screen output
4
Review Syntax Errors
• Click on error message to see line
• Error messages are not always clear
• Error may occur on line above line
identified by error message
• Single error may give multiple error
messages
• Learn how to interpret error messages
during the semester
5
Assessment Results
• 10 students completed assessment
– 8 rate general computer skills above
minimal
– 8 students rate programming skills as
minimal or none
• Two students do not have Math 150A or
higher
• All students have access to a computer
at home (6 windows PC, 2 MAC 2 No
answer or answer unclear)
6
Assessment Quiz
•∫x3dx = x4/4 + C – Three incorrect
(three more missing constant, C)
•d(e
ax)/dx = aeax – Four correct
• 1000112= 3510 – One correct; use
binary numbers to understand storage
• x = 10; x = x + 5; gives x = 15 – Six
correct; shows meaning of = as
replacement of value in computing