Due Feb 19
2.11 b, c.
2.12 a, c.
2.14 b, c.
2.19, 2.21, 2.24, 2.26.
Programming exercises
- Write an Exchan11ge Sort program that sorts a list in descending
order.
- Write a program that reads a text file and prints a count of the
number of occurrences of the puctuation marks (.,!?)
- Write a program that enters an NxN matrix A of integer values
and prints the trace of the matrix. The trace is defined as the sum
of the diagonal elements.
Trace(A) = A[0,0] + A[1,1] + ... + A[N-1,N-1]