Here is the code:
string answer = Console.ReadLine(); if (answer.IndexOf("окей")) { Console.WriteLine("ну окей, так окей"); }
I need the code to find the word OK in the answer variable that the user enters into the console. Please correct me. What did I write wrong here?
if (answer.IndexOf("окей") != -1)
- Alexey Shimansky