fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <algorithm>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. string input;
  9. cout << "Please Enter 'add'" << endl;
  10. cin >> input;
  11. transform(input.begin(), input.end(), input.begin(), ::tolower);
  12. if(input == "add")
  13. {
  14. cout<<"You entered 'add'" <<endl;
  15. }
  16. else
  17. {
  18. cout<<"You didn't enter 'add'"<<endl;
  19. }
  20. }
Success #stdin #stdout 0s 2988KB
stdin
AdD
stdout
Please Enter 'add'
You entered 'add'