Help me with code please ! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Help me with code please !

Hello ! I need some help , because I'm beginner and I don't understand so much . When I type the word incorrectly it will appear this "This is incorrect ! You won't be able to use the program if your try is unsuccessful again !" and I want from here when I type the correct word which is Start my program to continue normally . Here is the code : #include <iostream> using namespace std; int main() { string answer; string start; string again; cout << "Type ''Start'' to continue !"<< endl; cin >> start; if ( start == "Start") { cout << "Correct ! You can continue !" << endl; system("cls"); } else { cout << "This is incorrect ! You won't be able to use the program if your try is unsuccessful again !' !!" << endl; cin >> again; return 1; } cout << "What is your name ?"<< endl; cin >> answer; cout << endl; cout << "Thanks for the information ! You can leave by pressing any button !"<< endl; system("Pause"); return 0; }

19th Apr 2019, 12:22 PM
Hristo Hristov
1 Answer
+ 4
c++ is case sensitive! if(start==“Start”) should be if(start==“start” || start==“Start”)
19th Apr 2019, 12:39 PM
Logomonic Learning
Logomonic Learning - avatar