Lecture 2: Integers (PDF)
Document Details
Uploaded by FervidDune
ETH Zurich
Tags
Summary
This document is a lecture on integer arithmetic. It discusses evaluating arithmetic expressions, associativity, precedence, and types such as int and unsigned int.
Full Transcript
3. Integers Evaluation of Arithmetic Expressions, Associativity and Precedence, Arithmetic Operators, Domain of Types int, unsigned int 64 Example: power8.cpp int a; // Input int r; // Result std::cout > a; r = a * a; // r =...
3. Integers Evaluation of Arithmetic Expressions, Associativity and Precedence, Arithmetic Operators, Domain of Types int, unsigned int 64 Example: power8.cpp int a; // Input int r; // Result std::cout > a; r = a * a; // r = a^2 r = r * r; // r = a^4 std::cout