fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. int main()
  5. {
  6. int s;
  7. cin >> s;
  8. cout << "The next number for the number " << s << " is " << (s+1) << ".\n";
  9. cout << "The previous number for the number " << s << " is "<< (s-1) << ".";
  10. return 0;
  11. }
Success #stdin #stdout 0.01s 5324KB
stdin
Standard input is empty
stdout
The next number for the number 32764 is 32765.
The previous number for the number 32764 is 32763.