C++ Programming Blog

 
 
 
#include <iostream.h>
#include <conio.h>
#include <dos.h>
#include <stdio.h>

void main()
{
   clrscr();
   struct date d;

   getdate(&d);

   int da;

   cout<<\"Enter U R  graduation date\";
   cin>>da;

   int dif=da-d.da_year;
   if(dif<0)
   {
    cout<<dif<<\"is left\";
   }
   if(dif>0)
   {
    cout<<dif<<\" Year  completed\";
   }
   getch();


}

 
 
Didn't find what you were looking for? Find more on Example of Date