Lecture 4: April 10, 2023
Reading
:
zyBooks text
, §3.1–3.12, 3.16–3.19; [5]
True and false in C
Relations and conditionals
<
,
<=
,
>
,
>=
,
==
,
!=
&&
,
||
,
!
Conditional statements
if
if … else
Nested
if
s
The right way to do this
switch
Reading input
make_change.c
Usability: prompt for amount
scanf
Error handling
make_change_cp.c
if
statement
Back to program
Handouts
Precedence and Associativity of C Operators,
associativity.pdf
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email:
mabishop@ucdavis.edu
ECS 36A, Programming & Problem Solving
Version of April 10, 2023 at 2:34PM
You can also obtain a PDF version of this.