help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 1 i 2


From: slaythemall
Subject: Re: 1 i 2
Date: Wed, 22 Jun 2016 01:03:02 -0700 (PDT)

Czy w drugim suma na pewno ma być mniejsza?

dla większej będzie jakoś tak:
function [i] = zad_2()
        suma = sqrt(3)/2
        n = 2
        
        while (1)
                suma += n * sqrt(n + 3) /(2^n)
                
                if (suma > 4.8)
                        i = n
                        return;
                endif
                
                n += 1;
        endwhile
endfunction



--
View this message in context: 
http://octave.1599824.n4.nabble.com/1-i-2-tp4677888p4677897.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]