Check out example codes for "how to take input in C++ in coding". It will help you in understanding the concepts better.

Code Example 1

int x; 
cout << "Type a number: "; // Type a number and 
  press enter
cin >> x; // Get user 
  input from the keyboard
cout << "Your number is: " << x; 
  // Display the input value

Learn ReactJs, React Native from akashmittal.com