fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. string year_of_birth = "1996";
  8. int age = 2026 - stoi(year_of_birth);
  9. cout<<"Current age is "<< age<<endl;
  10. return 0;
  11. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
Current age is 30