Chapter 3: Expressions and Interactivity PDF
Document Details
Uploaded by WellInformedCarnelian4928
2017
Tony Gaddis, Judy Walters, and Godfrey Muganda
Tags
Summary
This document is chapter 3 of a C++ textbook, focusing on expressions and interactivity. It covers topics such as input/output operations (cin/cout), data types, and mathematical expressions. The book is titled "Starting Out with C++ Early Objects", ninth edition.
Full Transcript
Chapter 3: Expressions and Interactivity Starting Out with C++ Early Objects Ninth Edition, Global Edition by Tony Gaddis, Judy Walters, and Godfrey Muganda Copyright © 20...
Chapter 3: Expressions and Interactivity Starting Out with C++ Early Objects Ninth Edition, Global Edition by Tony Gaddis, Judy Walters, and Godfrey Muganda Copyright © 2017 Pearson Education, Ltd. Topics 3.1 The cin Object 3.2 Mathematical Expressions 3.3 Data Type Conversion and Type Casting 3.4 Overflow and Underflow 3.5 Named Constants Copyright © 2017 Pearson Education, Ltd. 3-2 Topics (continued) 3.6 Multiple and Combined Assignment 3.7 Formatting Output 3.8 Working with Characters and Strings 3.9 More Mathematical Library Functions 3.10 Random Numbers Copyright © 2017 Pearson Education, Ltd. 3-3 3.1 The cin Object cin is the standard input object Like cout, requires iostream file Used to read input from keyboard Data is retrieved from cin with >>, the stream extraction operator cin >> x; Copyright © 2017 Pearson Education, Ltd. 3-4 Input Type cin converts the user input string of characters to the type that matches the variable int height; cout > height; string name; cout