fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int getInput(){
  5. int input{};
  6. cout << "Please enter an integer: \n";
  7. cin >> input;
  8. return input;
  9. }//end getInput
  10.  
  11. int multiplyInput(){
  12. int x{}; //x is the variable to be multiplied
  13. int twoTimesX{x * 2};
  14. return 0;
  15. }//end multiplyInput
  16.  
  17. int main() {
  18. // your code goes here
  19. cout << getInput();
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 4420KB
stdin
5
stdout
Please enter an integer: 
5