Posts

Showing posts with the label Hello world program

Hello World Program

This is very simple program. You can write it easily. The exact code for this program is given below.  #include <iostream> using namespace std; void main() {   cout<<"Hello World!"<<endl;   system ("pause"); } Explanation: In the first line ,  #include <iostream>  it is c++ built in library. This library provides some functions that are very useful. You will understand it gradually, when you will study functions and classes in c++. As a beginner, it is enough for you to remember that it is a built in library and you have to include it in every code or program. The second line   using namespace std;  make it easy for you to use input stream cin>>  , output streams cout<<  , and other function like endl  easily. If you do not use it or if you want to skip it then you will have to write std::cout<< instead of only cout<<  , std::cin>> instead of cin>> and std::endl instead...