Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 1 / Variables.cpp
diff options
context:
space:
mode:
Commit9b6e11e828356a61ad2f6a8446c5d49be0ace252 (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2020-10-09 14:50:52 +0300
Committer
 GitHub <noreply@github.com>
2020-10-09 14:50:52 +0300
Filese71f0a56d79db543454c0b179fb951dc145ad945 /Sem. 1/Variables.cpp
Introduction_to_programming_FMI-9b6e11e828356a61ad2f6a8446c5d49be0ace252.tar
Introduction_to_programming_FMI-9b6e11e828356a61ad2f6a8446c5d49be0ace252.tar.gz
Introduction_to_programming_FMI-9b6e11e828356a61ad2f6a8446c5d49be0ace252.zip
Parent42b21798063f8717e1d4523c04350805095f844f (diff)
Update Variables.cpp
1 files changed, 7 insertions, 2 deletions
-rw-r--r--Sem. 1/Variables.cpp9
diff --git a/Sem. 1/Variables.cpp b/Sem. 1/Variables.cpp
index 222b9e2..f793a65 100644
--- a/Sem. 1/Variables.cpp
+++ b/Sem. 1/Variables.cpp
@@ -8,9 +8,14 @@ int main()
int a, b, c, d, e, f;
a = b = c = d = e = f = 5;
+ //Types
+ int t1 = 4;
+ double t2 = 4.5;
+ char t3 = 'v';
+ bool t4 = true;
- //Operators
+ //Operators
//Arithmetic operators
int num1 = 5;
@@ -18,7 +23,7 @@ int main()
int result = a + b; //7
result = a - b; //3
- result = a*b; //10
+ result = a * b; //10
result = a / b; // 2 (not 2.5) (both are ints)
result = a%b; //1 5:2 = 2 (rem :1)