fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int x = 1;
  7. if (x = 2) {
  8. cout << "A" << endl;
  9. } else {
  10. cout << "B" << endl;
  11. }
  12. cout << x << endl;
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5376KB
stdin
Standard input is empty
stdout
A
2