#include <iostream>
#include <vector>
#include <ctime>
#include <algorithm>
#include <string>
using namespace std;
int main()
{
string bob;
string alice;
string name;
for (int i = 0; i < 1; i++) {
cout << "Please enter the name bob or alice ";
cin >> name;
}
if (name == alice && name == bob) {
cout << " Greetings " << name;
}
else {
cout << "This name is invalid try again." << endl;
}
return 0;
}
Hello, I understand that this may be an unimportant or irrelevant topic, but I have a review test coming up in my computer science class. I'm trying to get a quick refresher in all that I've learned in last semester and I'm curious to why in this line of code when you type in bob or alice it should come out saying Greetings alice, or Greeting bob which ever you have inputted. Though right now it's completely skipping it and going to invalid try again. It's almost as if the information is being completely bypassed and then the code coming to a conclusion that nothing has been inputted.
Again I'm extremely sorry for the stupid question I'm just looking for a refresher.