what is the use of cin and cout
The usage of cin is simple, too, and as cin is used for input, it is accompanied by the variable you want to be storing the input data in: std::cin >> Variable; Thus, cin is followed by the extraction operator >> (extracts data from the input stream), which is followed by the variable where the data needs to be stored.
Standard output (cout) On most program environments, the standard output by default is the screen, and the C++ stream object defined to access it is cout. For formatted output operations, cout is used together with the insertion operator, which is written as << (i.e., two less than signs).