From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-3.2 required=3.0 tests=BAYES_00,NICE_REPLY_A, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!news.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: project euler 26 Date: Mon, 4 Sep 2023 14:06:13 +0300 Organization: Tidorum Ltd Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net X4M1AE7izSoaH/dXkYBMQQB/bRdQQN6ZccEnC1C9mCG8sgZC1o Cancel-Lock: sha1:8N4TV7AhdC4BdAvWZ0xw7uvnt80= sha256:xRLkTFp9qE39hUNFCMeYMzE/cUKfejWcOIFRle5PJOI= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:65588 List-Id: On 2023-09-04 12:19, CSYH (QAQ) wrote: > I am new to Ada, I know is there a good way to start this program? > thanks > https://projecteuler.net/problem=26 First invent/discover the method (algorithm) for solving the problem, without thinking about the programming language. I don't think any language has built-in features that would lead to a direct solution, although some functional language with lazy evaluation could come close, because such languages can manipulate unbounded (potentially infinite) sequences of values. Such sequences can be handled in Ada, too, but with more effort -- they are not "built in" to Ada.