Input Output

Think before you code.

Read an integer from the user and print it back — the first program in any language.

easy

Input Output

📘 Definition. Complete the function printNumber which takes an integer input from the user and prints it on the screen.

Usage

  • C++: cout << variable_name;
  • Java: System.out.print();
  • Python: print()
  • JavaScript: console.log()

Example 1

Input : (user gives value): 7
Output : 7

Example 2

Input : (user gives value): -5
Output : -5

Example 3

Input : (user gives value): 0
Output : 0

Constraints

-1000 <= User Input <= 1000