 // Lab 8, Working with structs
// Programmer : Maiar Khattab
// Editor(s) used : Code Blocks 13.12
// Compiler(s) used : Code Blocks 13.12

#include<iostream>
using std::cout;
using std::endl;

#include<cstdlib>

//struct def
struct tod
{
int hour;// the hr , 0-23
int minute;// the min, 0-59
int second;//the sec, 0-59
char descr [32];//the description of the time of day

};
//void printTod(const tod&);
int main ()
{
  cout << "Lab 8, Working With structs\n";
  cout << "Programmer: Maiar Khattab\n";
  cout << "Editor(s) used: Code Blocks 13.12\n";
  cout << "Compiler(s) used: Code Blocks 13.12\n";
  cout << "File: " << __FILE__ << endl;
  cout << "Complied: " << __DATE__ << " at " << __TIME__ << endl << endl;

            tod theTime[] =  {{12,0,0, "noon"},
            {0,0,0," midnight"},
            {6,00,00," supper "},
            {11,30,0,"bedtime"}};
          
          for(int i; i <5; i++)
          {
             char descr [32];                    
            cout << theTime[i].descr << " is " << theTime[i].hour << ':' 
            << theTime[i].minute << ":" << theTime[i].second << endl; 
          }
}
      
  