fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int i;
  6. cin >> i;
  7. cout << boolalpha << cin.good() << '\n';
  8. cin >> i;
  9. cout << boolalpha << cin.good() << '\n';
  10. return 0;
  11. }
Success #stdin #stdout 0s 15240KB
stdin
15
asdf
stdout
true
false