1028. Input Output
Complete the function printNumber which takes an integer input from the user and prints it on the screen.
Use:-
- for C++ : cout << variable_name;
- for Java : System.out.print();
- for Python : print()
- for Javascript : console.log()
Example 1:
Input(user gives value): 7
Output: 7
Example 2:
Input(user gives value): -5
Output: -5
Now Your Turn!
Pick the correct output for the given inputInput(user gives value): 0
Still unsure what the problem is asking ?
Let’s go through a few more examples, step by step, to make it clearer.
Constraints:
- -1000 <= User Input <= 1000