TINF_Abgaben
Revision 3:5e9d7e9d2fbc, committed 2020-04-27
- 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 |
diff -r e26ede163624 -r 5e9d7e9d2fbc Simbuerger_03_Uebung.cpp --- 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;