From 6e20db5d66b7bb10b6bb4df52fcf718d8aa0e159 Mon Sep 17 00:00:00 2001 From: Matthew Strapp Date: Wed, 13 Feb 2019 15:27:57 -0600 Subject: Finish lab --- ee1301/wk2/lab2/greektax.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 ee1301/wk2/lab2/greektax.cpp (limited to 'ee1301/wk2/lab2/greektax.cpp') 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 +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; + +} -- cgit v1.2.3