aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk2/lab2/greektax.cpp
diff options
context:
space:
mode:
authorMatthew Strapp <msattr@gmail.com>2019-02-13 15:27:57 -0600
committerMatthew Strapp <msattr@gmail.com>2019-02-13 15:27:57 -0600
commit6e20db5d66b7bb10b6bb4df52fcf718d8aa0e159 (patch)
treec1cd56cb8d8e416e468ef9644fc4e17e448417bc /ee1301/wk2/lab2/greektax.cpp
parentS P A C I N (diff)
downloadhomework-6e20db5d66b7bb10b6bb4df52fcf718d8aa0e159.tar
homework-6e20db5d66b7bb10b6bb4df52fcf718d8aa0e159.tar.gz
homework-6e20db5d66b7bb10b6bb4df52fcf718d8aa0e159.tar.bz2
homework-6e20db5d66b7bb10b6bb4df52fcf718d8aa0e159.tar.lz
homework-6e20db5d66b7bb10b6bb4df52fcf718d8aa0e159.tar.xz
homework-6e20db5d66b7bb10b6bb4df52fcf718d8aa0e159.tar.zst
homework-6e20db5d66b7bb10b6bb4df52fcf718d8aa0e159.zip
Finish lab
Diffstat (limited to 'ee1301/wk2/lab2/greektax.cpp')
-rw-r--r--ee1301/wk2/lab2/greektax.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/ee1301/wk2/lab2/greektax.cpp b/ee1301/wk2/lab2/greektax.cpp
new file mode 100644
index 0000000..7da4aa6
--- /dev/null
+++ b/ee1301/wk2/lab2/greektax.cpp
@@ -0,0 +1,32 @@
+#include <iostream>
+using namespace std;
+int main () {
+ int income;
+ int tax=0;
+ cout << "Εισάγετε το εισόδημά σας: ";
+ cin >> income;
+ if (income>10000) {
+ int k10=income-10000;
+ if (k10<=0){
+ tax+=((income-10000)*.1);
+ }
+ else {
+ tax+=2000;
+ }
+ if (income>30000) {
+ int k30=income-10000;
+ if (k30<=0){
+ tax+=((income-30000)*.2);
+ }
+ else {
+ tax+=8000;
+ }
+ if (income>70000) {
+ tax+=((income-70000)*.3);
+ }
+ }
+ }
+
+ cout << "Χρωστάς " << tax << " δραχμές." << endl;
+
+}