hey guys, this is my first time on this forum and i am in need of some help with a small detail of my assignment. here is what i have so far.
#include <iostream>
#include <ctime>
using namespace std;
int main()
{
while (Y == answer)
{
srand (time(0));
int Age = rand()%140 ;
cout<< " You are " <<Age <<endl;
cout<< " would you like me to try again? type Y for yes, type N for no. ";
int answer;
cin>> answer;
}
system("pause");
return 0;
}
the auto correct states y as undeclared but im not sure how to declare Y or fix this program. any help would be appreciated, thank you.