CSCI 102 - Fall 2017 Fundamentals of Computation

In-class Exercises

Here is a C++ scratchpad:

cpp/scratch

Expressions and cin

cpp/cin/building_floor
cpp/cin/average
cpp/cin/deg2rad
cpp/var-expr/iomanip
cpp/var-expr/coins
cpp/var-expr/change
cpp/var-expr/in_n_days
cpp/var-expr/gpa
cpp/var-expr/interp1d

Conditional (if) Statements

cpp/conditionals/extracredit
cpp/conditionals/stoplight
cpp/conditionals/stoplight3
cpp/conditionals/nestedec
cpp/control/compare2
cpp/conditionals/taxbrackets
cpp/conditionals/instock
cpp/conditionals/rps
cpp/conditionals/bill2law

While Loops

cpp/while/whilen
cpp/while/sum50
cpp/while/blastoff
cpp/while/dowhilen
cpp/while/goldilocks
cpp/while/turn360
cpp/while/nodds