#include<iostream> #include<cmath> #include<ctime> using namespace std;int main (){ int cDate; int cMonth; int cYear; int bDate; int bMonth; int bYear; int resultDate; int resultMonth; int resultYear; time_t result; result = time(NULL); struct tm* tp = localtime(&result); cMonth = tp->tm_mon + 1; cDate = tp->tm_mday; cYear = tp->tm_year + 1900; cout << "\nPlease Enter The Date In Which You Were Born:\n"; cout<<"Date :"; cin >> bDate; cout << "\nPlease Enter The Month In Which You Were Born:\n"; cout << "Month: "; cin >> bMonth; cout << "\nPlease Enter The Year In Which You Were Born:\n"; cout << "Year: "; cin >> bYear; resultDate = cDate - bDate; resultMonth = cMonth - bMonth; resultYear = cYear - bYear; cout<<endl <<endl; cout << "Your Age is: \n"; cout << "Years: " <<resultDate << endl; cout << "Months: " <<resultMonth <<endl; cout << "Days: " <<resultYear <<endl <<endl; return 0;}