INPUTS & OUTPUTS
- Inputs are used to follow a variable that will be used to store data that will be used in the stream.
- cin - gets data in from the user
- Outputs allows you to put out data in your program
- cout - how you display your data to the screen
cout << “Hello world” << endl; //cout outputs to the screen, endl shows that there is a new line afterwards
cin >> h; //memorise the value input by the user in variable h
cout << h; //prints the value of h *variables doesn’t need quotes
- Those functions are used to send messages to the users and also to ask the user to give a specific value to a variable using the keyboard input.