Mod2 - EF 2314 Engineering Problem Solving With C Module 2 Statements input/output data types Good-your computer works and you have been able to

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

View Full Document Right Arrow Icon
EF 2314 Engineering Problem Solving With C++ Page 1 Module 2 — Statements, input/output, data types Revised 1:42 PM 1/13/02 EF 2314 Engineering Problem Solving With C++ Module 2 — Statements, input/output, data types Good—your computer works and you have been able to write a C++ program, compile it, test it, and submit it for grading. In this module, you will design and write your own C++ program to solve an engineering problem. You will learn how to prompt a user for input and generate simple output; you will learn how to make your program make decisions ( if -statements); you will learn some basic data types; and you will begin to learn about numerical errors. Summary of Tasks: 1. Read Section 2.2 (statement execution). .................................................................. pp. 33-42 2. Answer review questions 1-2. ......................................................................................... pg. 42 3. Read Section 2.3 (input/output operations) . ............................................................ pp. 42-44 4. Answer review questions 1-2. ......................................................................................... pg. 45 5. Read Section 2.4 (data types). .................................................................................. pp. 45-49 6. Answer review questions 1-4. ................................................................................... pp. 49-50 7. Read “Classes as Compound Data Types” . .................................... provided in this document 8. Complete and submit homework 2 ............................................... individual graded effort OPTIONAL: 9. Programming project 1 . .................................................................................................. pg. 68
Background image of page 1

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

View Full DocumentRight Arrow Icon
EF 2314 Engineering Problem Solving With C++ Page 2 Module 2 — Statements, input/output, data types Revised 1:42 PM 1/13/02 Read Section 2.2 Answer review questions Read section 2.2 in the course textbook (pages 33-42). Observe the order the statements are executed, especially when you arrive at an if -statement: It is a good habit to enclose the TRUE and FALSE portions of an if -statement, respectively, using {} braces. This makes it quite clear to the programmer and the compiler what is included in each respective portion. Common programming problems are (1) braces that do not pair up, or (2) missing braces. It is therefore also a good habit to format the if -statements as shown here with the TRUE and FALSE portions indented. This indentation makes it easier to visually follow the logic of the program and detect any missing braces. Then answer the review questions at the end of this section (page 42). You can find the answer to question 1 on page 441. Read Section 2.3
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/02/2008 for the course ENGE 2314 taught by Professor Tdwalker during the Fall '07 term at Virginia Tech.

Page1 / 6

Mod2 - EF 2314 Engineering Problem Solving With C Module 2 Statements input/output data types Good-your computer works and you have been able to

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

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