1#include <iostream>
2
3using namespace std;
4
5int main()
6{
7 int a,b;
8 char str[] = "Hello Programmers";
9
10 /* Single insertion operator */
11 cout << "Enter 2 numbers - ";
12 cin >> a >> b;
13 cout << str;
14 cout << endl;
15
16 /* Multiple insertion operator */
17 cout << "Value of a is " << a << endl << "Value of b is " << b;
18
19 return 0;
20}
1#include <iostream>
2using std::cout;
3int main()
4{
5 cout<<"Hello world";
6 return 0;
7}
1std::cout << "Hello World!" << std::endl; //Or you can do
2std::cout << "Hello World!" <<; //Only in some scenarios
1//c++
2cout and std::cout both are same, but the only difference is that if we
3use cout, namespace std must be used in the program or if you are not
4using std namespace then you should use std::cout.