fork download
  1. #include <iostream>
  2.  
  3.  
  4. using namespace std;
  5.  
  6.  
  7. int main()
  8.  
  9. {
  10.  
  11. int age,months;
  12.  
  13.  
  14. cout << "Enter the age of person in years\n";
  15.  
  16. cin >> age;
  17.  
  18.  
  19. months = age * 12;
  20.  
  21. cout <<"The age of person in months = " << months << endl;
  22.  
  23.  
  24. return 0;
  25.  
  26. }
  27.  
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
Enter the age of person in years
The age of person in months = -1758024804