Ch. 2 Computer Science

# Ch. 2 Computer Science - computing machine Keary Hoffman....

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

Keary Hoffman. Chapter 2 1. 1, 2, 3 2. Single line comment 3. int months = 2, days, years = 3; 4. a. 2 +a = b b. b*4 = a c. a/3.14 =b d. b-8 = a e. a =27 f. c = K g. c= B 5. Multi- line comment 6. Single line 7. # include < iostream> int main() { cout << " Two mandolins like creatures in the\ n\ n\ n"; cout << " dark\ n\ n\ n"; cout << " Creating the agony of ecstasy.\ n\ n\ n"; cout << " - George Barker\ n\ n\ n"; return 0; } 8.a. 32, 212 b. x = 8, y = 2 c. i am the incredible

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: computing machine Keary Hoffman. Chapter 2 and I will Amaze You 9. C 10. c 11. B 12. a 13. B 14.d 15. B, C 16. d 17. A) 12 B) 4 C) 2 D) 6 E) 1 18. a. 3287000 b. -978650000 c. .007655 d. -5.871023 19. A 20. a 21. True 22. false 23. True 24. true 25. speed = 20 Time = 10 Keary Hoffman. Chapter 2 Speed * time = distance Cout << distance; 26. 172.5 = force 27.5 = area Force/area = pressure Cout << pressure;...
View Full Document

## This note was uploaded on 04/03/2010 for the course CMPSC 121 taught by Professor Crawford,georgew during the Spring '07 term at Pennsylvania State University, University Park.

### Page1 / 3

Ch. 2 Computer Science - computing machine Keary Hoffman....

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

View Full Document
Ask a homework question - tutors are online