Hmm...
Code:
#include<iostream>
int main()
{
int *year_now = new int;
int *age_now = new int;
int *number_years_married = new int;
cout << "Enter the current year then press RETURN.\n";
cin >> *year_now;
cout << "Enter your current age in years.\n";
cin >> *age_now;
cout << "Enter the number of years married.\n";
cin >> *number_years_married;
delete year_now;
delete age_now;
delete number_years_married;
return 0;
}
or....
Code:
void Input(int *year_now, int *age_now, int *number_years_married);
int main()
{
int year_now;
int age_now;
int number_years_married;
Input(&year_now, &age_now, &number_years_married);
return 0;
}
void Input(int *year_now, int *age_now, int *number_years_married)
{
cout << "Enter the current year then press RETURN.\n";
cin >> *year_now;
cout << "Enter your current age in years.\n";
cin >> *age_now;
cout << "Enter the number of years married.\n";
cin >> *number_years_married;
}