aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk2/lab2/greektax.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;
+
+}