What is wrong with this program, why won't this work? I'm getting back into programming, I don't know how to make this work. Thank you! Note this is only part of a bigger program. Everything works except for this part. Thanks again.
#include <iostream>
#include <string>
#include <ctime>
#include <stdlib.h>
usingnamespace std;
int main ()
{
srand(time(0));
std::string rockpaperscissors[3] = {"rock", "paper", "scissors"};
std::string rps;
if (response == ("yes"))
{
cout <<" Okay, say what you're going to do";
getline (cin, rps);
cout <<rockpaperscissors[rand() %3];
if (rockpaperscissors == ("rock"))
{
if (rps == ("rock"))
{
cout <<" Alright, go again.";
}
if (rps == ("paper"))
{
cout <<" You win, want to go again?";
}
if (rps == ("scissors"))
{
cout <<" I win, want to go again?";
}
}
if (rockpaperscissors == ("paper"))
{
if (rps == ("rock"))
{
cout <<" I win, want to go again?";
}
if (rps == ("paper"))
{
cout <<" Alright, go again.";
}
if (rps == ("scissors"))
{
cout <<" You win, want to go again?";
}
}
if (rockpaperscissors == ("scissors"))
{
if (rps == ("rock"))
{
cout <<" You win, want to go again?";
}
if (rps == ("paper"))
{
cout <<" I win, want to go again?";
}
if (rps == ("scissors"))
{
cout <<" Alright, go again";
}
}