Write a cpp program to print "Hello World!"?

/* For Turbo C++ */

#include<iostream.h>
#include<conio.h>
void main()
{
  clrscr();
  cout<<"Hello World!";
  getch();
}

Output:



/* For IDK Code Block or others */

#include<iostream>
#include<conio.h>
using namespace std;
main()
{
  cout<<"Hello World!";
  getch();
}

Output:





Note:-

 In Code Block or some other idk clrscr() function gives error: 'clrscr' was not declared in this scope.

Comments

Popular posts from this blog

Larch Soft Pvt. Ltd. - Best Website & Hosting Provider