diff options
author | Matthew Strapp <msattr@gmail.com> | 2019-02-13 15:27:57 -0600 |
---|---|---|
committer | Matthew Strapp <msattr@gmail.com> | 2019-02-13 15:27:57 -0600 |
commit | 6e20db5d66b7bb10b6bb4df52fcf718d8aa0e159 (patch) | |
tree | c1cd56cb8d8e416e468ef9644fc4e17e448417bc /ee1301/wk2/lab2/greektax.cpp | |
parent | S P A C I N (diff) | |
download | homework-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.cpp | 32 |
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; + +} |