fork download
  1. #include <iostream>
  2. int main()
  3. {
  4. int width {}; // value-initialization
  5.  
  6. std::cout << "Enter an integer: ";
  7. std::cin >> width; // standard character input into the named object 'width'
  8.  
  9. std::cout << "The User has entered the number: " << width << '\n';
  10. return 0;
  11. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
Enter an integer: The User has entered the number: 0