Article View: de.sci.mathematik
Article #108Re: [HJ]Re: Zahl^0
From: Markus Becker
Date: Sat, 14 Jun 2003 15:27
Date: Sat, 14 Jun 2003 15:27
44 lines
3241 bytes
3241 bytes
f'up2 dsm, wieso wird das eigentlich immer mehr cross-
gepostet, und das gleich noch �ber Sprachgrenzen hinweg?
Hans Joss schrieb am Wed, 11 Jun 2003 16:45:07 +0200:
> Z�hlen ist somit keine Rekursive Angelegenheit
> sonder eine Reihe resp. eine Schleife oder ein LOOP
Man kann jede Reihe resp. Schleife oder LOOP auch rekursiv
ausdr�cken, pass auf:
> n = 0
> For i = 1 to 10
> n += i
> end
> Print "Alle Zahlen zusammengez�hlt von 1 bis 10 " & n
>
> Das ist *keine* Rekursion.
/* C */
#include <stdio.h>
int sum_it(int n)
{
if (n<0) exit(-1);
if (n==0) return 0;
else return n+sum_it(n-1);
}
int main()
{
printf("Alle Zahlen zusammengez�hlt von 1 bis 10 %d\n",sum_it(10));
return 0;
}
/* End */
Das *ist* Rekursion. Und formal *identisch* zu Deiner LOOP.
> Nein.
> Das hat mit Rekursion nicht zu tun.
> das ist eine Schleife.
Man kann *jede* Schleife auch durch Rekursion ausdr�cken.
Markus
Technical Details
Message-ID:
<bcfes9$io1fe$1@ID-30313.news.dfncis.de>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!skynet.be!skynet.be!fu-berlin.de!uni-berlin.de!pd9e5f423.dip.t-dialin.NET!not-for-mailReferences:
<3edd0ac8$0$20558$91cee783@newsreader01.highway.telekom.at> <3eddb916$0$1053$5402220f@news.sunrise.ch> <bbkk5m$7tu$1@rex.ip-plus.net> <3eddf247$0$1041$5402220f@news.sunrise.ch> <bbld16$at0$2@rex.ip-plus.net> <bblhp5$kih$1@nets3.rz.RWTH-Aachen.DE> <bbn53b$f9u$1@rex.ip-plus.net> <bbnlg5$a2n$1@nets3.rz.RWTH-Aachen.DE> <bbnvrp$iab$4@rex.ip-plus.net> <bbo30e$9kg$1@nets3.rz.RWTH-Aachen.DE> <bbpff2$lt3$3@rex.ip-plus.net> <x5y90ft364.fsf@lola.goethe.zz> <bbslj2$1v7$12@rex.ip-plus.net> <f9fade32.0306080544.11adb1a5@posting.google.com> <pan.2003.06.08.13.55.22.922950@unifr.ch> <bbvnu1$50q$00$1@news.t-online.com> <bc2p8q$h1u$5@rex.ip-plus.net> <slrnbe9qca.ojo.denshimeiru-sapmctacher@message-id.durchnull.ath.cx> <bc3t4m$jrv$3@rex.ip-plus.net> <slrnbec9qq.dii.denshimeiru-sapmctacher@message-id.durchnull.ath.cx> <bc6fta$ru4$1@rex.ip-plus.net> <bc6klf$fscrr$1@ID-152837.news.dfncis.de> <bc7g8j$3uu$1@rex.ip-plus.net>Show Full Headers
Complete Article Headers
X-Google-Language: GERMAN,ASCII
X-Google-Thread: 10c1fa,4e1e4c7eebdd8c18
X-Google-Attributes: gid10c1fa,public
X-Google-Thread: fc006,5b6fdd3219828911
X-Google-Attributes: gidfc006,public
X-Google-Thread: 1032cb,4269f02e885e0585
X-Google-Attributes: gid1032cb,public
X-Google-ArrivalTime: 2003-06-14 08:27:07 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!skynet.be!skynet.be!fu-berlin.de!uni-berlin.de!pd9e5f423.dip.t-dialin.NET!not-for-mail
From: Markus Becker <yetimb4u@gmx.de>
Newsgroups: de.sci.mathematik,ch.talk,ch.comp
Subject: Re: [HJ]Re: Zahl^0
Followup-To: de.sci.mathematik
Date: 14 Jun 2003 15:27:06 GMT
Organization: private
Lines: 44
Message-ID: <bcfes9$io1fe$1@ID-30313.news.dfncis.de>
References: <3edd0ac8$0$20558$91cee783@newsreader01.highway.telekom.at> <3eddb916$0$1053$5402220f@news.sunrise.ch> <bbkk5m$7tu$1@rex.ip-plus.net> <3eddf247$0$1041$5402220f@news.sunrise.ch> <bbld16$at0$2@rex.ip-plus.net> <bblhp5$kih$1@nets3.rz.RWTH-Aachen.DE> <bbn53b$f9u$1@rex.ip-plus.net> <bbnlg5$a2n$1@nets3.rz.RWTH-Aachen.DE> <bbnvrp$iab$4@rex.ip-plus.net> <bbo30e$9kg$1@nets3.rz.RWTH-Aachen.DE> <bbpff2$lt3$3@rex.ip-plus.net> <x5y90ft364.fsf@lola.goethe.zz> <bbslj2$1v7$12@rex.ip-plus.net> <f9fade32.0306080544.11adb1a5@posting.google.com> <pan.2003.06.08.13.55.22.922950@unifr.ch> <bbvnu1$50q$00$1@news.t-online.com> <bc2p8q$h1u$5@rex.ip-plus.net> <slrnbe9qca.ojo.denshimeiru-sapmctacher@message-id.durchnull.ath.cx> <bc3t4m$jrv$3@rex.ip-plus.net> <slrnbec9qq.dii.denshimeiru-sapmctacher@message-id.durchnull.ath.cx> <bc6fta$ru4$1@rex.ip-plus.net> <bc6klf$fscrr$1@ID-152837.news.dfncis.de> <bc7g8j$3uu$1@rex.ip-plus.net>
Reply-To: yetimb@web.de
NNTP-Posting-Host: pd9e5f423.dip.t-dialin.net (217.229.244.35)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 1055604426 19662318 217.229.244.35 (16 [30313])
X-Face: H,zO>jB\`,00p>h5%@c7|\gfOfx54xx&fLnk$b_Z~FG;|:8;4E|$,^Y15#<v8:jAJge?:\?z0xV)hl:mk~~Be=DY#42Sf?M]Y1[ki?Vg>)D"93|YNZmeo?h*Uu1.Hlxp*^ukC)$xLkOUat0^JSDNcmIUey8f0v/$hn0<jt{Q\a|K\LQXOe_6CRN;q7n-gb$
User-Agent: slrn/0.9.7.4 (Win32) Hamster/2.0.0.1