There is a couple ways you can improve the code.
You don't need to enforce the use of lowercase answers on the user - Why not grab whatever they enter and transform it to a lowercase string
an example of this would be:
- Code: Select all
std::transform(answer.begin(), answer.end(), answer.begin(), tolower);
Called after you have retrieved the users input
---------------------------- Code: Select all
std::cin >> answer;
This will only pick up one word, It's probably better to use something like this in the future just in case:
- Code: Select all
getline(std::cin, answer);
---------------------------- Code: Select all
if (answer == "microsoft")
Use methods provided to you by the string class:
- Code: Select all
if (answer.compare("microsoft") == 0) // a return of 0 means the two strings match
---------------------------Are all the functions really necessary? The program is only small, you may as well do it in main()
I'm sorry if I was too picky

, It's a good job for someone who is learning the language - If you need something more explained I'll be more than happy.