Sujet : Re: Loops (was Re: do { quit; } else { })
De : Ros (at) *nospam* invalid.invalid (Rosario19)
Groupes : comp.lang.cDate : 16. Apr 2025, 11:29:05
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <ad1vvjtvk7ppgdfdp047uk60o13j0jvr13@4ax.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : Forte Free Agent 1.93/32.576 English (American)
On Tue, 15 Apr 2025 11:30:24 +0100, bart wrote:
for (i=0 i<=N; ++i)
>
Most such loops iterate over 0..N-1 inclusive, so would need "<". So, in
your opinion, is that <= a typo, or is the intention to iterate over
0..N inclusive (so N+1 iterations)?
>
>
(May reply to rest separately.)
the loop enter with i=0
than make i= 1..N N in the count
so would be N+1 times iterations
that are 0..N or 0,1,2,3...,N
<= is not a Typo
i not find the problem