- Code:
-
#include <iostream.h>
int main()
{
cout << "Hello World!\n";
return 0;
}
Include <iostream.h>
That is basically tells the compiler what to use sorta
int main()basically telling the compiler here is where the code begins
cout << "Hello World!\n";cout << is what you use to write something on the screen.
\n Is what the compiler interprets as new line. Always end with a semicolon out side the Quotation marks
return 0;All ANSI-compliant programs declare main() to return an int. This value is "returned" to the operating system when your program completes. Some programmers signal an error by returning the value 1