#include <stdio.h>

#define LEN 6 

void print_chart(float t[2][LEN]);
void clear_F_values(float t[2][LEN]);

int main ()
{

   /* variable declarations */
   /* a 2-D array: an array (length 2)  of arrays (length 6 ) of floats */
   float temp[2][LEN] = {  {0,20,40,60,80,100},       
                           {32,68,122,158,194,212} };

   print_chart(temp);

   clear_F_values(temp);

   printf("\nClearing F values ... \n\n");
   print_chart(temp);

   return 0;
}


void print_chart(float t[2][LEN])
{
   int i;
 
   /* print Celcius and Fahrenheit values in a table*/
   printf("C\t");          
   for ( i=0; i<LEN; i++) {
     printf("%3.1f\t", t[0][i]);  /* print value from t[1] */
   }
   printf("\n");          

   printf("F\t");          
   for ( i=0; i<LEN; i++) {
     printf("%3.1f\t", t[1][i]);  /* print value from t[2] */
   }
   printf("\n");          

};

void clear_F_values(float t[2][LEN])
{
  int i;
  for ( i=0; i<LEN; i++) 
    t[1][i] = 0;
  return;
};
