CMPSC 201 Demos
CMPSC 201 Home

hello world

long statements

cin assignment statement

integer division mod

Files

reading from file

writing to file

appending to file

Strings

strings

If Statements

if statements

Loops

while loop - sentinel value, flag variable, running total

nested loops - sequential search, break, exiting completely out of an inner loop

for loop - can be adapted to a for loop that iterates different determinate amounts

Functions

compute tax function

lots of easy functions

odd or even function

Arrays

array intro

array intro with loop

sequential search simple

sequential search finding max value

2D arrays

2D arrays complete

adding matrices

matrix multiplication

matrixdata.txt

Finding Roots

bisection method guessing game

Bisection Method aka Program 14.1

Modified Regula Falsi aka Program 14.2 or Modified Method of False Position

Integration

Integration with Trapezoidal Rule & Simpson's 1/3 Rule

Integration with Trapezoidal Rule & Simpson's 1/3 Rule & customizable polynomial function

Solving Systems of Linear Equations

Gaussian Elimination -

Cramer's Rule

Miscellaneous

numbers txt - for use in demos above