we are running our coding in redhat 8 linux So for this we have to install G++
step 1 : yum install gcc-c++
To write the code we have to write code in Here Vim is a Text Editior
Step 2 : Vim first.cpp
As we write In now we have complie and run the code
Step 3 : G++ first.cpp #complie the code
Step 4 : ./a.out #run the code
So now your code will run and we can our output
-
cin >> y --> to take inputs
-
cout << y --> to show output
- scanf --> to take inputs
2)printf --> to show output