QuickReview_ch1-4

# QuickReview_ch1-4 - BEFORE using them 2 1 Aesthetics Indent...

This preview shows pages 1–4. Sign up to view the full content.

Quick review if (x =< 0) {. . .} if x <= 0 {. . .} if (0 <= x <= 4) {. . .} if {x <= 5} (. . .) if (x >= y); {. . .} if (x >= y) {. . .}; if (x > y) {. . .} if (x >> y) {. . .} wrong: (x <= 0) wrong: (x <= 0) wrong: (x <= 5) {. . .} wrong: (x >= y) {. . .} wrong: (x >= y) {. . .} right wrong: (x > y) {. . .}

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

View Full Document
Quick review y = x*x*x; x*x*x = y; y = << -2*x; y = -2x; y = x ; y = x^5; right wrong: y = x*x*x; wrong: y = -2*x; or cout << -2*x; wrong: y = -2*x; wrong: y=0.5*x; or y=x/2.0; wrong: y = pow(x,5); Also, don’t forget to declare your variables

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: BEFORE using them 2 1 Aesthetics Indent your code as needed!!! Look at how example codes from the lecture are indented Look at where the { } are placed Try to make your code fit the same format Think of your code as an outline Outline example I. Music Genres A. Rock 1. Nirvana 2. Soundgarden B. Classical 1. Beethoven 2. Mozart C. Hip-hop/R&B 1. Sean Combs a. P-Diddy b. Puff Daddy c. Sean “Puffy” Combs...
View Full Document

## This note was uploaded on 09/05/2011 for the course CGS 2421 taught by Professor Onal during the Fall '09 term at University of Florida.

### Page1 / 4

QuickReview_ch1-4 - BEFORE using them 2 1 Aesthetics Indent...

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

View Full Document
Ask a homework question - tutors are online