fork download
  1. #include <iostream>
  2. using namespace std;
  3. #include <string>
  4. #include <math.h>
  5.  
  6. int main(){
  7. string pass = "password";
  8. string input;
  9. cout << "What is your password: ";
  10. cin >> input;
  11. if (input==pass){
  12. cout << "Correct" << endl;
  13. }else{
  14. cout << "Wrong" << endl;
  15. }
  16. return 0;
  17. }
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
What is your password: Wrong