Sei sulla pagina 1di 173

Are there alternate exam times?

Yes, the information is on the syllabus

Which XCODE version?


Xcode 5 if your OS supports
if not, version your OS supports

Which Visual Studio Version?


We suggest Visual Studio Professional 2013

How to register my i>clicker?


Register through ctools

Posting your code on Piazza is NOT allowed.

To get help:
Piazza 183help@umich.edu (when you reply, do Reply All)

Go to discussion sections
Go to office hours

Zyante && CodeLab - Due Fri 1/17 Zyante:


Required Readings are on syllabus Infinite number of attempts possible

CodeLab
"sort by deadline" upper-left-hand side Infinite number of submits possible

ML Dorf

Executing the procedure happens here

Thinking Memory

Information and Procedure to answer the question are stored here

Question

Answer

Processor

Question

Answ

er

Memory
(stores data and procedure program)

I/O Devices Hardware Processor

Computer

Memory
Data

Software
Code

Data

Program

Results
(computer)

A program is:
An implementation of an algorithm

An algorithm is:
A sequence of instructions used to

accomplish a goal.

Check whether a number is even or odd


x

Read X If X is divisible by 2: Write Even Else: Write Odd


Odd

Divisible By 2

Even

A Programming Language is: an artificial language designed to communicate instructions to a computer Convenient for people to write programs Convenient for computers to understand
Why not use Natural Languages ?
(like English)

A programming Language Has Two Components:


Syntax (Form)
Keywords (Vocabulary) Operators Expressions (Sentences) Etc.

Semantics (Meaning)
Examples: if = condition while = conditioned loop Etc.

No ambiguity

A program is an implementation of an algorithm


#include <iostream> using namespace std; int main() { int x; cin>>x; if (x % 2 == 0) { cout << "Even"; }else{ cout << "Odd"; } return 0; }

Read X If X is divisible by 2: Write Even Else: Write Odd

Algorithm

C++ Implementation

A program is an implementation of an algorithm

Read X If X is divisible by 2: Write Even Else: Write Odd

x = int(raw_input('Enter a value: ')) if x % 2 == 0: print 'Even' else print 'Odd'

Algorithm

Python Implementation

There are many different classes of programming languages


Check:

http://en.wikipedia.org/wiki/List_of_programming_languages_by_t ype#Procedural_languages

We are interested in:


High Level
VS

Machine

Compiled

VS

Interpreted

Machine

Easier for Humans

Faster for Computers

High-level

High-Level
int x = 3; int y = 5; boolean flag; if(x+y > 7){ flag = true; }

Object Code Machine (Binary)

010101110100101010111 100101010101111010111 000111100111111110001 010101110100111110100 111111100001001111011

Easy to read, write, & debug Employ powerful data and control primitives e.g. C++, Java, PHP, etc

Difficult to read, write Direct control Executes fast Hard to use Not portable

High-Level
int x = 3; int y = 5; boolean flag; if(x+y > 7){ flag = true; }

Object Code Machine (Binary)

Compiler

010101110100101010111 100101010101111010111 000111100111111110001 010101110100111110100 111111100001001111011

Easy to read, write, & debug Employ powerful data and control primitives e.g. C++, Java, PHP, etc

Difficult to read, write Direct control Executes fast Hard to use Not portable

Compiled

Interpreted

Recently turned 30: Has aged well Makes it possible to create programs with
Fast execution Small amount of code Runs on a variety of computing environments (portable) Functionality Features

C++ 11
Standardized in 2011

Enables creation of complex/powerful apps


Business Open source Most games

Fast execution

Almost 20 (1st release Jan 1994)


Python 2.0 released Oct 16, 2000
Most current: Python 2.7.5

Makes it possible to create programs with


Fast development Small amount of code

Runs on a variety of computing environments (portable)


Functionality && Features Great for web development

Python 2.7.5 3.3 -- not backwards compatible


Enables creation of complex/powerful apps
Web-based software Open source

Best asset
Software development more rapid

Execution speed
Has improved still slow comparatively

Memory was something you lost with age An application was for employment A program was a TV show A keyboard was a piano A web was a spider's home A virus was the flu A CD was a bank account A hard drive was a long trip on the road A mouse pad was where a mouse lived

First Program C++ Language Elements Standard Libraries Identifiers Comments Variables & Literals Operators Data Types Expressions Mixed Mode
Casting

Start

int main (void) { return 0; }


End
.. and go back to caller (usually the OS)

where it all starts


int main (void) { return 0; } "main" function

int main (void) { return 0; }

values passed to the program (nothing in this case)

int main (void) { return 0; } Go back to where the function was called from (OS in case of 'main')

int main (void) { return 0; } Return Value


(When 0 is returned to the OS from main, it means all is good)

Return Type
int main (void) { return 0; }

Return Type
int main (void) { these MUST match in types return 0; } Return Value

int main (void) { return 0; } Denotes the end of a simple statement

int main (void) { return 0; }


Denote the beginning and the end of code blocks. In this case, they define where the function starts and ends.

#include <iostream> using namespace std; int main (void) { cout << "Hello World!" << endl; return 0; }

#include <iostream> using namespace std; int main (void) { cout << "Hello World!" << endl; return 0; }
A Statement. Prints "Hello World!" to the standard output stream

#include <iostream> using namespace std; int main (void) { cout << "Hello World!" << endl; return 0; }
object to send output to Basically, says to print to standard output stream

#include <iostream> using namespace std; int main (void) { cout << "Hello World!" << endl; return 0; }

operator for printing used to put things into output stream

#include <iostream> using namespace std;

Denotes end of line

int main (void) { cout << "Hello World!" << endl; return 0; }

#include <iostream> C++ using namespace std; this is a STATEMENT int main (void) { cout << "Hello World!" << endl; return 0; }

#include <iostream> using namespace std;

int main (void) { cout << "Hello World!" << endl; return 0; }

I/O operations require including the I/O standard file from the C++ standard library.

#include <iostream> using namespace std;

int main (void) { cout << "Hello World!" << endl; return 0; }

A directive that tells the preprocessor to include code of iostream library before compilation

#include <iostream> using namespace std;

int main (void) { cout << "Hello World!" << endl; return 0; }

All files in the C++ standard library declare all of its entities within the std namespace.

#include <iostream> using namespace std;

import sys def main (argv): print 'Hello World!'

int main (void) { cout << "Hello World!" << endl; if __name__=='__main__': return 0; main(sys.argv) }

#include <iostream> using namespace std;

import sys def main (argv): print 'Hello World!'

int main (void) { cout << "Hello World!" << endl; if __name__=='__main__': return 0; main(sys.argv) }

#include <iostream> using namespace std;

import sys def main (argv): print 'Hello World!'

int main (void) { cout << "Hello World!" << endl; if __name__=='__main__': return 0; main(sys.argv) }

A) void B) int C) real D) I have no idea

A) Make reading the code easier B) Meant to confuse students C) Group statements together D) Show where main begins and ends

Always keep your code in a working state Write some code, compile it and test it Then write some more code, compile it and test it

Etc.

Always keep your code in a working state Write some code, compile it and test it Then write some more code, compile it and test it Etc. You dont want to write a lot of code and then discover that something is wrong! Why???

First Program C++ Language Elements Standard Libraries Identifiers Comments Variables & Literals Operators Data Types Expressions Mixed Mode
Casting

Install of C++ provides


base set of built-in capabilities

Many additional features provided standard libraries


The standard I/O library iostream defines features for

input and output needs to be specifically included to be used #include <iostream> using namespace std;

Install of C++ provides


base set of built-in capabilities

Many additional features provided standard libraries


The standard I/O library iostream defines features for

input and output needs to be specifically included to be used #include <iostream> Python: using namespace std; import

First Program C++ Language Elements Standard Libraries Identifiers Comments Variables & Literals Operators Data Types Expressions Mixed Mode
Casting

Comments are parts of the source code disregarded by the compiler


C++

// line comment
/* ... block comment */

// My first Program // Author: ML Dorf // Date: 01.14.2014

#include <iostream> using namespace std;


int main ( void) { cout << "Hello World!" << endl; return 0; }

Comments are parts of the source code disregarded by the compiler


C++

// line comment
/* ... block comment */

Python # line comment Python """ block comment """

# My first Program # Author: ML Dorf # Date: 01.14.2014

import sys
def main (argv): print 'Hello World!'

if __name__ == '__main__': main(sys.argv)

First Program C++ Language Elements Standard Libraries Identifiers Comments Variables & Literals Operators Data Types Expressions Mixed Mode
Casting

Values
Also knows as literals

cout << 1 + 2; //1 2 are integer literals cout << "Hello World!"; //string literal

Common "operators" or symbols to do calculations are: Add 2 numbers Subtract 2 numbers Multiply 2 numbers Divide one number by another Remainder with INTEGER division (MOD)

+ * / %

^ does NOT indicate exponentiation ^ is Bitwise exclusive OR

Unary Operators: + (positive), - (negative) and ONE number


Examples: -5

+3

Binary Operators: +, -, *, /, %, ** and a number on both sides operators in the middle


Examples: 3+2

-5 * 7

10 % 6

First Program C++ Language Elements Standard Libraries Identifiers Comments Variables & Literals Operators Data Types Expressions Mixed Mode
Casting

Expressions are sequences of operators and operands. Operands can be literals, variables, or other expressions
Examples:

5 + (3 / 2) * 10 -5 + 3

#include <iostream> using namespace std;

int main(void) { cout << 3 + 4 * 7 << endl; return 0; }

A) 49 B) 31 C) none of the above

#include <iostream> using namespace std;

int main(void) { cout << "3 + 4 * 7" << endl; return 0; }

A) 49 B) 31 C) none of the above

Precedence 1 2 3 4 5

Operator
() + - (unary) * / % + - (binary) =

Grouping Left to right Right to left Left to right Left to right Right to left

See a full list http://en.cppreference.com/w/cpp/language/operator_precedence Grouping defines the precedence order when several operators of the same precedence level are in an expression.

Precedence Operator 1 () 2 + - (unary) 3 4 5 * / % + - (binary) =

Grouping Left to right Right to left Left to right Left to right Right to left

cout << 3 + 4 * 7 << endl; cout << 3 + 28 << endl;

What does the following statement print?

cout << 10 / 5 - 3 + 2 * 6;
A) B) C) D) E) 6 11 17 60 None of the above

What does the following statement print? cout << 15 / 5 % 2 * 3;

A) B) C) D) E)

45 3 6 9 None of the above

What does the following statement print? cout << 15 / (5 % 2) * 3;

A) B) C) D) E)

45 3 6 9 None of the above

What does the following statement print? cout << "24 / 4 * 2";

A) B) C) D)

12 3 1 None of the above

Watch out if you have int / int


2.0 / 3.0 2/3 5.0 / 2.0 5/2

A) 0 B) 0.666 C) Dont Know

Watch out if you have int / int


2.0 / 3.0 2/3 5.0 / 2.0 5/2

A) 0 B) 0.666 C) Dont Know

Watch out if you have int / int


2.0 / 3.0 2/3 5.0 / 2.0 5/2

A) 2 B) 2.5 C) 3 D) Dont Know

Watch out if you have int / int


2.0 / 3.0 2/3 5.0 / 2.0 5/2

A) 2 B) 2.5 C) 3 D) Dont Know

Watch out if you have int / int


2.0 / 3.0 2/3 5.0 / 2.0 5/2 -5 / 2

A) -2 B) -2.5 C) -3 D) Dont Know

5 % 2

2 % 3

A) 0 B) 1 C) 2 D) 3 E) Dont Know

5 % 2

2 % 3

A) 0 B) 1 C) 2 D) 3 E) Dont Know

5 % 2

2 % 3
4 % 2

A) 0 B) 1 C) 2 D) 3 E) Dont Know

How many hours and minutes are there in 375 minutes?


A) hours: 375 / 60 minutes: 375 % 60 B) hours: 375 % 60 minutes: 375 / 60 C) hours: 375 / 60 minutes: (375 / 60.0 - 375 / 60) * 60 D) Dont Know

Given pCode an int variable that holds postal codes MI has 5-digit postal codes that start with 48 or 49

48109 for BBB Building on Hayward To get the 1st 2 digits of pCode:
A) B) C) D) pCode pCode pCode pCode % / % / 10000 10000 1000 1000

Send to MI if 1st 2 digits is equal to (48 or 49)

What does the following evaluate to? 100 - 25 * 3 % 4

A) 1 B) 97 C) none of the above

What does the following evaluate to? 3+2+1-5+4%2-1/4+6

A) 6 B) 7 C) none of the above

First Program C++ Language Elements Standard Libraries Identifiers Comments Variables & Literals Operators Data Types Expressions Mixed Mode
Casting

A variable is a name for something Sets up a location in memory Stores a value into that location

Give it a name that describes its purpose Specify the type of info it will hold Examples: Memory
int playerScore; int numZombiesDefeated;

playerScore

numZombiesDefeated

Variables great way to reuse values and store results

Variables must have a name

char int double bool

float
hold over from years ago computers had limited memory

Examples: 'A'

'$'

'5' 'e'

Range
-128 to 127 (signed) 0 to 255

(unsigned)

Each character represented by a unique value


encoding is done via ASCII look-up table

e.g., 'A' stored as 65 (01000001)

Dec 0 1 2 3 4

Char NULL Start of Heading Start of Text End of Text End of Transmission

Dec 12 13 14 15 16

Char Form Feed (\f) Carriage Return (\r) Shift Out Shift In Data Link Escape

Dec Char 24 25 26 27 28 Cancel End of Medium Substitute Escape File Separator

5
6 7 8 9

Enquiry
Acknowledge Bell (\a) Backspace (\b) Horizontal Tab (\t)

17
18 19 20 21

Device Cntrl 1
Device Cntrl 2 Device Cntrl 3 Device Cntrl 4 Negative Acknowledge

29
30 31

Group Separator
Record Separator Unit Separator

10 11

Line Feed (\n) Vertical Tab (\v)

22 23

Synchronous Idle End of Trans. Block

Dec 32 33 34 35 36

Char Dec
space

Char Dec . / 0 1 2 60 61 62 63 64

Char Dec < = > ? @ 74 75 76 77 78

Char Dec J K L M N 88 89 90 91 92

Char Dec X Y Z [ \ 102 103 104 105 106

Char Dec f g h i j 116 117 118 119 120

Char t u v w x

46 47 48 49 50

! " # $

37
38 39 40 41 42 43 44 45

%
& ' ( ) * + , -

51
52 53 54 55 56 57 58 59

3
4 5 6 7 8 9 : ;

65
66 67 68 69 70 71 72 73

A
B C D E F G H I

79
80 81 82 83 84 85 86 87

O
P Q R S T U V W

93
94 95 96 97 98 99 100 101

]
^ _ ` a b c d e

107
108 109 110 111 112 113 114 115

k
l m n o p q r s

121
122 123 124 125 126

y
z { | } ~

Dec 32 33 34 35 36

Char Dec
space

Char Dec . / 0 1 2 60 61 62 63 64

Char Dec < = > ? @ 74 75 76 77 78

Char Dec J K L M N 88 89 90 91 92

Char Dec X Y Z [ \ 102 103 104 105 106

Char Dec f g h i j 116 117 118 119 120

Char t u v w x

46 47 48 49 50

! " # $

37
38 39 40 41 42 43 44 45

%
& ' ( ) * + , -

51
52 53 54 55 56 57 58 59

3
4 5 6 7 8 9 : ;

65
66 67 68 69 70 71 72 73

A
B C D E F G H I

79
80 81 82 83 84 85 86 87

O
P Q R S T U V W

93
94 95 96 97 98 99 100 101

]
^ _ ` a b c d e

107
108 109 110 111 112 113 114 115

k
l m n o p q r s

121
122 123 124 125 126

y
z { | } ~

Examples: 5, -1, 323, 1000

Range:
Signed: -2147483468 to 2147483467 (32-bit) Unsigned: 0 to 4294967295

Do NOT begin integers with a zero

Do NOT do: 01234

Will get weird results

Whole numbers

No commas (1,000 wont work!)


No spaces (1 000 000 wont work!)

Range:
-2147483468 to 2147483467 (32-bit)

That's -2,147,483,468 to 2,147,483,467 (32-bit)

How about: remember 10 digits and 1st digit is a 2 (or just "2 billion+")

Known as: OverFlow could be


0 goes out positive and comes in negative go ????

Be Careful

double

Size: 8 bytes
Range: 2.22507e-308 to 1.79769e+308

"default" datatype for Real numbers


"floating point" numbers

Examples:
1.32e2 3.0E4 5E-3

1.0 3.141592 -42.15

Numbers with decimal values

0.06 represented as
6e-2 6E-2 6.0e-2 .6e-1

float: Not used any more (except on old machines)


Size: 4 bytes Range: 1.17549e-38 to 3.40282e+38 original form for Real Numbers

booleans only have two values


True False

boolean values normally are the result of comparing two values more on these later

Name char

Description Character or small integer

Size*

int

Integer

Range* signed: -128 to 127 1byte unsigned: 0 to 255 signed: -2147483648 to 2147483647 4bytes unsigned: 0 to 4294967295 (10 digits)

Boolean value. It can bool take one of two 1byte true or false values: true or false Double precision +/- 1.7e +/- 308 double 8bytes floating point number (~15 digits)

Which of the following is not a valid datatype?

A) double B) float C) Int D) char

Which of the following is not a valid datatype?

A) int B) real C) bool D) char

variables must have a type

variables must have a name


variable type cant be changed once declared

variables must have a type variables must have a name variable type cant be changed once declared Examples:
int value; double pi; int a, b, c; char oneChar;

1) Start with a letter or underscore ('_') 2) After the first character, any number of letters, underscores, or digits 3) Cant be reserved word (also known as reserved words)

Max size 31 chars (most systems) C++ is case-sensitive (int != Int) System identifiers usually start with '_'

Words reserved by C++ language


Have special meanings Cant be used as identifiers (e.g. cant be used as function names) List 5 keywords that we have seen so far:

alignas alignof and and_eq asm auto(1) bitand bitor bool break case catch char char16_t char32_t

class compl const constexpr const_cast continue decltype default delete do double dynamic_cast else

enum explicit export extern false float for friend goto if inline int long mutable

namespace new noexcept not not_eq nullptr operator or or_eq private protected public register reinterpret_cast

return short signed sizeof static static_assert static_cast struct switch template this thread_local throw true

try typedef typeid typename union unsigned using virtual void volatile wchar_t while xor xor_eq

alignas alignof and and_eq asm auto(1) bitand bitor bool break case catch char char16_t char32_t

class compl const constexpr const_cast continue decltype default delete do double dynamic_cast else

enum explicit export extern false float for friend goto if inline int long mutable

namespace new noexcept not not_eq nullptr operator or or_eq private protected public register reinterpret_cast

return short signed sizeof static static_assert static_cast struct switch template this thread_local throw true

try typedef typeid typename union unsigned using virtual void volatile wchar_t while xor xor_eq

// My first Program // Author: My Name // Date: 01.14.2013

#include <iostream> using namespace std;


int main (void) { cout << "Hello World!" << endl; return 0; }

and as assert break class continue def

del elif else except exec finally for

from global if import in is lambda

not or pass print raise return try

while with yield

and as assert break class continue def

del elif else except exec finally for

from global if import in is lambda

not or pass print raise return try

while with yield

# My first Program # Author: ML Dorf # Date: 01.14.2014

import sys
def main (argv): print 'Hello World!'

if __name__ == '__main__': main(sys.argv)

Sets up a storage location int value;

4 bytes
(int size)

value

Sets up a storage location int value; double pi;

4 bytes
(int size)

value

8 bytes
(double size)

pi

Sets up a storage location int value; double pi;

value

We will use this notation for simplicity

pi

int x; cout << x << endl;

value

Prints garbage i.e., prints whatever arbitrary value happens to be in x

Used to store a value in a variable Main assignment operator: =

variable = value
Assignment (not equality)

Example int x, y; x = 5; y = 3; x = y;

Example
Execution

int x, y; x = 5; y = 3; x = y;

Example int x, y; x = 5; y = 3; x = y;
5

Execution

Example int x, y; x = 5; y = 3; x = y;
5

Execution

Example int x, y; x = 5; y = 3; x = y;
3

Execution

The right hand side (RHS) of an assignment can be an expression


The lest hand side (LHS) MUST be a variable

variable = expression
the
Then the result is stored in the variable

Value
of the expression is computed first

Example

= 5 + 10
15

Multiple assignments work too


Example: int x, y, z; x = y = z = 5; int x, y, z; x = 5; y = 5; z = 5;

Equivalent

Declare a variable and assign a value to in one statement Examples:

int a = 5; int b = 3, c = 3; int d (-10);


Equivalent

int a; a = 5;

int b, c; b = c = 3;
int d; d = -10;

#include <iostream> using namespace std; int main( void ) { int value, x, y; value = 4; x = 3; y = x * x; y = y / value; cout << y << endl; return 0; }
A) 2 B) 4 C) 6 D) none of the above

Mixed Data Types in expression:


each sub-expression is promoted to the "highest"

type prior to evaluation

Type Promotion Guidelines

bool= char int double

double x; x = 11 / 5; x = 11.0 / 5;

double x;
x = 11 / 5; x = 11.0 / 5; //x will have value 2.0 //x will have value 2.2

int is promoted to double and then the division is performed

What will be stored?


double value; value = 12;

What will be stored?


Execution

double value; value = 12;

double variable

int value

What will be stored?


double value;
Execution

12.0

value = 12;
int value

double variable

Implicit type conversion from int to double (upcasting)

What will be stored?


int value; value = 3.67;

What will be stored?


Execution

int value; value = 3.67;

int variable

double value

What will be stored?


int value;
Execution

value = 3.67;
double value

int variable

Implicit type conversion from double to int (downcasting)

You cant put a large value into a small cup


Well, OK, you can, but youll lose some called "spillage" Compiler tries to help prevent this

issues warning pay attention to all "warnings"

#include <iostream> using namespace std;

int main( void ) { double x = 6.4; int a = x; cout << a << endl; return 0; }

A) B) C) D)

0 4 6 none of the above

Implicit Conversion
Happens automatically

Explicit Conversion
Using the casting operator: (type)

old form

Using keyword: static_cast<type>

new form

Examples

2.0

y x

int x = (int) 5.23; // old form

double y = static_cast<double> 2; // new form

int i = 1, j = 3;

double x = i / j;

// x 0.0

int i = 1, j = 3;

double x = i / j;

// x 0.0

int i = 1, j = 3;

double x = i / j;

//x 0.0

x = (double)i / (double)j;
// x 0.0

int i = 1, j = 3;

double x = i / j;

//x 0.0

x = (double)i / (double)j; //x0.33


// x 0.0

int i = 1, j = 3;

double x = i / j;

//x 0.0

x = (double)i / (double)j; //x0.33 x = (double)i / j; //x0.33 x = i / (double)j; //x0.33

int i = 1, j = 3; double x = i / j; //x 0.0

x = (double)i / (double)j; //x0.33 x = (double)i / j; //x0.33 x = i / (double)j; //x0.33 x = (double)(i / j);

int i = 1, j = 3; double x = i / j; //x 0.0

x = (double)i / (double)j; //x0.33 x = (double)i / j; //x0.33 x = i / (double)j; //x0.33 x = (double)(i / j); //x 0.0

double x; x = 1000 * 1000 * 1000 * 1000 * 0.5; cout << x << endl;

A)0.5 E12 B)0 C)non-deterministic

Variables do not need to be declared Take on type of value assigned into it

x = 5 #x is an int y = 3.5 #y is a float x=y # x is now a float

What will be stored?

value = int(3.67)
x = float(4)

double x(5.2), y(7.5); char ch = 'A'; int i = 10, j = 42; x = x % y;


ch = $

i = 5; j = 0; x = i / j;

double x(5.2), y(7.5); char ch = 'A'; int i = 10, j = 42; x = x % y;


ch = $;

// syntax error
// syntax error

i = 5; j = 0; x = i / j;

// run-time error

double x = 3.7;
i = (int) (x); i = (int) (x + 0.5); (rounds x) // i 3 // i 4

double x = 3.7;
i = (int) (x); i = (int) (x + 0.5); (rounds x) // i 3 // i 4

double x = 3.7;
i = (int) (x); i = (int) (x + 0.5); // i 3 // i 4

double x = 3.7;
i = (int) (x); i = (int) (x + 0.5); // i 3 // i 4

a great way to round x

From the following list, circle the statements that would be legal if these lines were in a single main program

int x = 34.5; bool boo = x; int g = 17; int y = g; y = y + 10; int s; s = y; int b = 3; int v = b; int n = 12; v = n; double k = 1000 * 1000 * 1000 * 90 * .5; double y = 9.5; int p = 3 * g + y;

Across 3. Can't pin it down 4. Acronym for a chip 7. What's a prompt good for? 8. Just gotta have one 10. RUN 13. You're never going to change!!! 14. Could be called "Father" Down 1. Quite a crew of characters 2. Not an integer (or ____ your boat) 3. Nothing is there 5. Source code consumer 6. Acronym for your laptop's power 9. Announce a new variable 11. Number variable type 12. Department of LAN jockeys 13. Say something

main function and structure of a program iostream


+, -, /, *, %, =, ()

operators and precedence datatypes and their relative sizes


bool, char, int, float, double

Coming up next: input and output

202

Potrebbero piacerti anche