Академический Документы
Профессиональный Документы
Культура Документы
Fall 2010
2 credit, S/U course
Meets all semester, Tu-Th from 12:20pm-1:10pm
Main goal is to teach as much of the C++ language as is
possible in the time given
Emphasis on learning by doing
12 Assignments
2 Prelims
One (potential) final project
CMS (Course Management System)
Home grown system used in Computer Science Department
All assignments distributed and collected electronically
http://cms.csuglab.cornell.edu
Course Web Site
Basic information
http://courses.cs.cornell.edu/cs2024/2010fa
#include <iostream>
#include <iostream>
return 0;
#include <iostream>
return 0;
}
Consider the following legal expressions:
if (condition)
{
execute multiple
lines of code
}!
Note the use of the scope delimeters when using multiple
lines of code.
The “condition” is, again, a boolean expression.
In C++, a boolean expression is simply an integer
expression where the value “0” represents “false” and any
other value represents “true”
Consider the following:
int x = 5;
if (x > 0)
std::cout << “x is greater than 0” << std::endl;
if (condition)
execute this line(s) of code
else
execute this other line(s) of code!
For example: