From 9b6e11e828356a61ad2f6a8446c5d49be0ace252 Mon Sep 17 00:00:00 2001 From: Angel Dimitriev Date: Fri, 9 Oct 2020 14:50:52 +0300 Subject: Update Variables.cpp --- Sem. 1/Variables.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Sem. 1/Variables.cpp') 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) -- cgit v1.3.1-23-gd82d