Friday, 1 February 2013

Simple Message in C++


Today i am going to teach you how to print a simple program in C++
before that i give you intro of some basic commands

  • cout<<      is used for output
  • cin>>        is used for input
  • "your message"         any string is placed in between commas
  • main()                    its a main body to any program where code is written
  • #include           is a library should be added for input and output from the program
here a simple program to print Hello world as a message

#include<iostream.h>
void main()
{
   cout<<"hello worls";
}


No comments:

Post a Comment