C Language Programming - EEGR-409, Assign #7, Mar 18, '08

 1.  Develop a program which acts as a printing calculator.


 Each entry consists of a number followed by an op.

 The operators are; S, E, +, -, *, /

 Remember to use fflush(stdin) prior to the scanf.

 For example;

             S 10.0    // 10.0
             + 2.0     // 12.0
             / 3.0     // 4.0
             -3.0      // 1.0
             * 8.0     // 8.0
             E 3.0      // end of program

 2.  Develop the following functions and whatever code is required to test them.

 typedef struct
 {
    int da, mo, yr;
 } DATE;


 DATE add_one_day(DATE d);
 DATE add_days(DATE d, int num_days);
 int calc_day_of_year(DATE d);
 int calc_num_days(DATE d1, DATE d2); // calculate the number of days between the two dates


3. Develop and test the following functions;

     float calc_det_3(float a[][3]);
     void interchange_cols(float a[], int col_a, col_b);
     void add_arrays(float a[][3], float b[][3], float c[][3]);
     print_array(float a[][3]);

4.  Develop and test the following three functions;

     void sort_2_up(int *pv1, int *pv2);
     void sort_3_up(int *pv1, int *pv2, int *pv3);
     void sort_4_up(int *pv1, int *pv2, int *pv3, int *pv4);