Lecture03MondayExpression

Lecture03MondayExpression - Expressions Types(int double...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Expressions Types (int, double, string, bool)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Style - is important! Formatting rules are there to make it easy for people (yourself and the teaching staff) to read and understand your code. It is crucial for the ease of maintenance of the code. Check out page 41, rule 33 - Document Preparation for Supreme court http://www.supremecourt. gov/ctrules/2010RulesoftheCourt.pdf Check out Rules that Google Engineers have to follow to write C++ code: http://google-styleguide. googlecode.com/svn/trunk/cppguide.xml
Background image of page 2
Current Style requirement 1. Setup your editor to indent and replace tab with 4 spaces. (No hard tabs, no 8 space indentations.) 2. Give your variable meaningful names. a. In general, variables are nouns. Some bool variables could be of the form is… or has…. b. All variable declarations should be at the beginning of your main function (must be INSIDE the {}). 3. Line up your code properly. All statements inside main {} should be indented by 4 spaces, including “return 0;”.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Code structure #include libraries using namespace std; int main() { statements }
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 16

Lecture03MondayExpression - Expressions Types(int double...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online