HI I have a question to ask. I wrote this program to check if a user imput "Hello World" correctly, but when I tested it out, correct input is also marked as wrong. Can someone help me with this?
Code:
#include <iostream> #include <string> using namespace std; int main() { string s; cin >>\ s; getline (cin, s); if (s == "Hello World"){ cout << "OK"; } else { cout << "Wrong Answer"; } }