TINF_Abgaben

Files at this revision

API Documentation at this revision

Comitter:
Ursukar
Date:
Mon Apr 27 14:08:52 2020 +0000
Parent:
2:e26ede163624
Commit message:
Jahreswechsel gefixt

Changed in this revision

Simbuerger_03_Uebung.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Simbuerger_03_Uebung.cpp	Tue Apr 21 18:09:00 2020 +0000
+++ b/Simbuerger_03_Uebung.cpp	Mon Apr 27 14:08:52 2020 +0000
@@ -48,9 +48,7 @@
             Monat += 1;
             Tag = 1;
         }    
-        if(Monat > 12){
-            Jahr +=1;
-        }
+        
     }
     else if(Monat == 2 && Tag > 28)
     {
@@ -62,6 +60,10 @@
         Monat += 1;
         Tag =1;
     }
+    if(Monat > 12){
+        Monat = 1;
+        Jahr +=1;
+        }
     if(Schaltjahr == 1 && (Monat == 2 && Tag > 28))
     {
         Monat += 1;