Sunday, January 3, 2010

Show letters in Program

This is the first article published in this Blog. Here I would like to write about Programming Language. As I know, there are several type of Programming Language, but here I want to start write about C++ Language, using Borland C++ version 5.02.
For the first lesson, is how to show letters in the program we made. For example sentence:
Hello.... Everybody....
This is my first Program.

First we have to open Borland C++ application installed in the computer, and in to the new text editor, just write this syntax:

#include "iostream.h"
#include "conio.h"
main ()
{
cout<<" Hello…. Everybody….";
cout<<" \nThis is my first Program.";
getch(); }

The result will be like this picture:


#include "iostream.h" is needed to open iostream header file and include it in the program, that contain cout<<.
#include "iostream.h" is needed to open conio header file and include it in the program, that contain getch() syntax.
main() is mean starting the program.
cout<< is used to print the letter between " ", on to the screen.
\n is used to make the letter followed to be printed on a new line.

0 comments:

Post a Comment