Hello World C++

The first unusual thing a beginner in programming is to create a program to display the words "Hello World". Here is the source code in C++ language to print text "Hello World" plus a name that is inputted into a variable in a command line program / console program.


/*
Programmed by Rifki Yandhi
Program : Hello World
*/
#include <iostream>
#include <conio.h>
using namespace std;

int main()
{
char chrName[10];

cout<<"Name : ";
cin >> chrName;

cout<<"\nHello World "<<chrName<<" this is C++ Language";
getch();
}


Screenshoot Program when it was finished compile :


Free source code and program download

0 comments:

Post a Comment