-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstant.cpp
More file actions
32 lines (24 loc) · 790 Bytes
/
constant.cpp
File metadata and controls
32 lines (24 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include<iostream>
int main(){
/*
The const keyword specifies that a variable's
value is constant
tells the compiler to prevent anything from
modifyig it
(read-only)
(ALL LETTER SHOULD BE CAPITAL)
*/
const double PI = 3.141516;
double radius = 10;
double cimcumference = 2 * PI * radius ;
std:: cout << cimcumference << " cm" << '\n';
const int LIGHT_SPEED = 299792458;
const int WIDTH = 1920;
const int HEIGHT = 1080;
/* Namespace = provies a solution for preventing name conflicts
in large prohects. Each entity needs a unique name.
A namespace allows for indentically named entities
as long as the namespace are different.
*/
return 0;
}