LIST OF EXAMPLES USED IN LECTURES
|
# |
Titles |
Files ( all in /examples) LINKS |
|
1 |
The first three examples |
|
|
2 |
A Sample Program |
|
|
3 |
Input Output Files in C++ < fstream.h> |
2ex1.appended ( using 2ex1dat.txt ) |
|
4 |
If statement |
|
|
5 |
Nested IF Statements |
|
|
6 |
Switch Statements |
|
|
7 |
While Loop |
|
|
8 |
The for statement |
|
|
9 |
Using fixed formats |
|
|
10 |
Using scientific formats |
|
|
11 |
Double variables and fixed formats |
|
|
12 |
An example on Newton's method of root finding |
|
|
13 |
An example on functions. Returning a single value |
|
|
14 |
Another example on functions. Returning no value |
|
|
15 |
Another example on functions. Multiple returns |
|
|
16 |
Bisection Method. An example of recursive use of a function |
|
|
17 |
Arrays. Reading from file |
6ex1.appended ....and ..... the data file |
|
18 |
Arrays. Storing factorials in an array |
|
|
19 |
Arrays as arguments of functions |
|
|
20 |
Arrays. Average value and Standard deviation of a list of scores |
|
|
21 |
Reading from files. Skipping lines and the .getline() function |
|
|
22 |
Numerical Differentiation |
|
|
23 |
A simple minded trapezoidal integration in C++ |