From 2a9c7400eb72fbf8a4f9b03f37f806c2c02d08a3 Mon Sep 17 00:00:00 2001 From: ShazidMahsrafi Date: Wed, 7 Jun 2023 20:14:56 +0600 Subject: [PATCH] initial commit --- 282A-Bit++/282A.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 282A-Bit++/282A.cpp diff --git a/282A-Bit++/282A.cpp b/282A-Bit++/282A.cpp new file mode 100644 index 0000000..f51b636 --- /dev/null +++ b/282A-Bit++/282A.cpp @@ -0,0 +1,18 @@ +#include +using namespace std; + +int main() +{ + int n, x = 0; + cin >> n; + while (n--) + { + char op[4]; + cin >> op; + if (op[1] == '+') + x++; + else if (op[1] == '-') + x--; + } + cout << x << endl; +} \ No newline at end of file