Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctime>
- using namespace std;
- int main(){
- time_t now = time(0);
- tm *ltm = localtime(&now);
- int year_added;
- int Cur_year = (1900 + ltm->tm_year);
- cout<<"Nhap nam sinh vao : ";
- cin>>year_added;
- cout << Cur_year - year_added;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement