Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Hermann Riemann <nospam.ng@hermann-riemann.de> |
|---|---|
| Newsgroups | ger.ct |
| Subject | Re: Niklaus Wirth (1934 - 2024) |
| Date | 2024-01-06 20:43 +0100 |
| Message-ID | <kvtor8Fdc8iU1@mid.individual.net> (permalink) |
| References | <un62na$1jj8$2@solani.org> <unb3cf$hofr$1@raubtier-asyl.eternal-september.org> <kvt040F92nbU1@mid.individual.net> <Versuch-20240106143724@ram.dialup.fu-berlin.de> |
On 06.01.24 14:47, Stefan Ram wrote:
> Hermann Riemann <nospam.ng@hermann-riemann.de> writes:
>> 2 Zahlen abziehen dürfte für die meisten kein Problem sein.
>> Wenn man den Geburtstag und Sterbetag berücksichtigt
>> ist die Altersbestimmung schon etwas schwieriger.
>
> Hier ein Versuch:
>
> PROGRAM ALTER( INPUT, OUTPUT );
> VAR GJ: INTEGER;
> VAR GM: INTEGER;
> VAR GT: INTEGER;
> VAR J: INTEGER;
> VAR M: INTEGER;
> VAR T: INTEGER;
> VAR A: INTEGER;
> BEGIN
> WRITELN( 'GEBURTSJAHR, GEBURTSMONAT, GEBURTSTAG?' );
> READLN( GJ, GM, GT );
> WRITELN( 'JAHR, MONAT, TAG?' );
> READLN( J, M, T );
> A := J - GJ;
> IF( M < GM )OR(( M = GM )AND( T < GT ))THEN A := A - 1;
> WRITELN( 'ALTER = ', A )
> END.
>
> . (Die Werte sind alle als Zahlen einzugeben. Bei der Eingabe sind
> die sechs Werte jeweils mit der Eingabetaste abzuschließen.)
>
import datetime
for alter in range(1024):
if datetime.date(1934+alter,2,15)>datetime.date(2024,1,1):
# da war er tot
print(alter-1) # da lebte er noch
break
Back to ger.ct | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Niklaus Wirth (1934 - 2024) "F. W." <me@home.invalid> - 2024-01-04 11:53 +0100
Re: Niklaus Wirth (1934 - 2024) Dietz Proepper <dietz.usenet@rotfl.franken.de> - 2024-01-04 14:22 +0100
Re: Niklaus Wirth (1934 - 2024) "F. W." <me@home.invalid> - 2024-01-04 14:58 +0100
Re: Niklaus Wirth (1934 - 2024) Hermann Riemann <nospam.ng@hermann-riemann.de> - 2024-01-04 16:57 +0100
Re: Niklaus Wirth (1934 - 2024) Herwig <herwig.huener@t-online.de> - 2024-01-04 21:48 -0800
Re: Niklaus Wirth (1934 - 2024) Hermann Riemann <nospam.ng@hermann-riemann.de> - 2024-01-05 13:17 +0100
Re: Niklaus Wirth (1934 - 2024) "F. W." <me@home.invalid> - 2024-01-05 07:09 +0100
Re: Niklaus Wirth (1934 - 2024) Hermann Riemann <nospam.ng@hermann-riemann.de> - 2024-01-05 20:31 +0100
Re: Niklaus Wirth (1934 - 2024) Herwig <herwig.huener@t-online.de> - 2024-01-04 21:31 -0800
Re: Niklaus Wirth (1934 - 2024) Hermann Riemann <nospam.ng@hermann-riemann.de> - 2024-01-05 13:32 +0100
[OT] Re: Niklaus Wirth (1934 - 2024) Walter Brill <WalterBrill@t-online.de> - 2024-01-05 16:18 +0100
Re: Niklaus Wirth (1934 - 2024) Herwig <herwig.huener@t-online.de> - 2024-01-05 08:06 -0800
Re: Niklaus Wirth (1934 - 2024) Hermann Riemann <nospam.ng@hermann-riemann.de> - 2024-01-05 17:58 +0100
Re: Niklaus Wirth (1934 - 2024) Gerhard Hoffmann <dk4xp@arcor.de> - 2024-01-05 22:17 +0100
Re: Niklaus Wirth (1934 - 2024) Stefan Reuther <stefan.news@arcor.de> - 2024-01-07 12:03 +0100
Re: Niklaus Wirth (1934 - 2024) Bonita Montero <Bonita.Montero@gmail.com> - 2024-01-05 19:13 +0100
Re: Niklaus Wirth (1934 - 2024) Bonita Montero <Bonita.Montero@gmail.com> - 2024-01-06 09:35 +0100
Re: Niklaus Wirth (1934 - 2024) Heinz Tauer <heinztauer@arcor.de> - 2024-01-06 11:19 +0100
Re: Niklaus Wirth (1934 - 2024) Bonita Montero <Bonita.Montero@gmail.com> - 2024-01-06 11:49 +0100
Re: Niklaus Wirth (1934 - 2024) Hermann Riemann <nospam.ng@hermann-riemann.de> - 2024-01-06 13:41 +0100
Re: Niklaus Wirth (1934 - 2024) Bonita Montero <Bonita.Montero@gmail.com> - 2024-01-06 14:07 +0100
Re: Niklaus Wirth (1934 - 2024) Matthias Hanft <mh@hanft.de> - 2024-01-06 14:16 +0100
Re: Niklaus Wirth (1934 - 2024) Bonita Montero <Bonita.Montero@gmail.com> - 2024-01-06 15:29 +0100
Re: Niklaus Wirth (1934 - 2024) Herwig <herwig.huener@t-online.de> - 2024-01-06 05:37 -0800
Re: Niklaus Wirth (1934 - 2024) Bonita Montero <Bonita.Montero@gmail.com> - 2024-01-06 15:32 +0100
Re: Niklaus Wirth (1934 - 2024) Diedrich Ehlerding <diedrich.ehlerding@t-online.de> - 2024-01-06 17:47 +0100
Re: Niklaus Wirth (1934 - 2024) Bonita Montero <Bonita.Montero@gmail.com> - 2024-01-06 18:34 +0100
Re: Niklaus Wirth (1934 - 2024) Diedrich Ehlerding <diedrich.ehlerding@t-online.de> - 2024-01-06 21:27 +0100
Re: Niklaus Wirth (1934 - 2024) Bonita Montero <Bonita.Montero@gmail.com> - 2024-01-07 07:36 +0100
Re: Niklaus Wirth (1934 - 2024) Herwig <herwig.huener@t-online.de> - 2024-01-07 04:16 -0800
Re: Niklaus Wirth (1934 - 2024) Bonita Montero <Bonita.Montero@gmail.com> - 2024-01-07 13:24 +0100
Re: Niklaus Wirth (1934 - 2024) Bonita Montero <Bonita.Montero@gmail.com> - 2024-01-07 13:28 +0100
Re: Niklaus Wirth (1934 - 2024) Hermann Riemann <nospam.ng@hermann-riemann.de> - 2024-01-06 19:49 +0100
Re: Niklaus Wirth (1934 - 2024) Diedrich Ehlerding <diedrich.ehlerding@t-online.de> - 2024-01-06 16:09 +0100
Re: Niklaus Wirth (1934 - 2024) Dietz Proepper <dietz.usenet@rotfl.franken.de> - 2024-01-06 17:22 +0100
Re: Niklaus Wirth (1934 - 2024) Michael Zink <michael@swamp.franken.de> - 2024-01-06 22:38 +0100
Re: Niklaus Wirth (1934 - 2024) Michael Bode <m.g.bode@web.de> - 2024-01-06 16:20 +0100
Re: Niklaus Wirth (1934 - 2024) Dietz Proepper <dietz.usenet@rotfl.franken.de> - 2024-01-06 17:24 +0100
Re: Niklaus Wirth (1934 - 2024) Ulf Kutzner <Ulf.Kutzner@web.de> - 2024-01-07 01:14 -0800
Re: Niklaus Wirth (1934 - 2024) Bonita Montero <Bonita.Montero@gmail.com> - 2024-01-07 10:18 +0100
Re: Niklaus Wirth (1934 - 2024) Dietz Proepper <dietz.usenet@rotfl.franken.de> - 2024-01-07 14:08 +0100
Re: Niklaus Wirth (1934 - 2024) Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2024-01-07 09:49 +0000
Re: Niklaus Wirth (1934 - 2024) Dietz Proepper <dietz.usenet@rotfl.franken.de> - 2024-01-07 12:02 +0100
Re: Niklaus Wirth (1934 - 2024) Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2024-01-07 12:39 +0000
Re: Niklaus Wirth (1934 - 2024) Dietz Proepper <dietz.usenet@rotfl.franken.de> - 2024-01-07 13:54 +0100
Re: Niklaus Wirth (1934 - 2024) Herwig <herwig.huener@t-online.de> - 2024-01-07 04:20 -0800
Re: Niklaus Wirth (1934 - 2024) Dietz Proepper <dietz.usenet@rotfl.franken.de> - 2024-01-07 13:56 +0100
Re: Niklaus Wirth (1934 - 2024) Hermann Riemann <nospam.ng@hermann-riemann.de> - 2024-01-06 21:18 +0100
Re: Niklaus Wirth (1934 - 2024) Hermann Riemann <nospam.ng@hermann-riemann.de> - 2024-01-06 20:43 +0100
Re: Niklaus Wirth (1934 - 2024) nobody@nowhere.invalid (Marc Olschok) - 2024-01-15 20:36 +0000
Re: Niklaus Wirth (1934 - 2024) Walter Brill <WalterBrill@t-online.de> - 2024-01-07 18:47 +0100
Re: Niklaus Wirth (1934 - 2024) "F. W." <me@home.invalid> - 2024-01-08 09:15 +0100
csiph-web