// Quiz Problem Lesson 4.4b on Learncpp.com
/*
* 1) Write a program that asks the user to enter their full name and their age.
* As output, tell the user how many years they’ve lived for each letter in their name
* (for simplicity, count spaces as a letter).
*/
#include <iostream>
usingnamespace std;
int main()
{
string name;
string age;
int letters = name.length();
cout << "Enter your full name." << endl;
getline(cin,name);
cout << "Enter your age." << endl;
cin >> age;
// The problem is this single line of code below.
double agePerLetter = static_cast<double>(age) / letters;
cout << "You've lived " << agePerLetter << " years for each letter in your name.\n"<<endl;
return 0;
}