Aug 21, 2024
#include <iostream>
using namespace std;
int main() {
cout << "Hello World";
return 0;
}
#include <iostream> - includes header file for input/output.using namespace std; - allows usage of standard library objects.int main() - signifies the main function.cout << "Hello World"; - outputs "Hello World".return 0; - ends the main function.cout object with << does not insert a new line unless specified with .//./* and end with */.type variable = value;int myNum = 15;
cout << myNum;
myVar vs myvar).const keyword.const int MINUTES_PER_HOUR = 60;
cin to get user inputs.int x;
cout << "Type a number:";
cin >> x;