🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #201

Re: problema con for de novato

#201
From: tikitaka
Date: Sun, 30 Aug 2009 21:35
47 lines
2130 bytes
No s� si entend� bien lo que quieres, pero ac� va mi respuesta seg�n lo que 
entend�, ya ver�s tu si te sirve o no

un for para la sumatoria, y otro for para la multiplicaci�n, deben estar 
anidados.
La sumatoria parte con 0, y  la multiplicaci�n parte con 1

s = 0;
for(i=1 ; i <= dt ; i++)
{
    r = 1;
    for(j = 0; j<i ; j++)
    {
        r = r* Wt(j+1)/Wt(j)
    }
    s = s+r
}

Nt = 1 + s;

saludos.

"Rick_oj" <rick_oj@[sin-esto]tutopia.com> escribi� en el mensaje 
news:h7egt7$6b4$1@news.nivel5.cl...
> Me llega a dar pena y verguenza esta pregunta, ya que en tantos a�os de 
> programacion que lo haya olvidado, pero aca va necesito hacer esta 
> sumatoria con productoria�
>
> la pongo como imagen mejor www.grabup.com/uploads/846e6d99c3d0.png
>
> Yi es lo siguiente www.grabup.com/uploads/a3ec7f13cb69.png
>
> si quiero hacer la sumatoria de Yi es:
>
> for (int j=0;j<dT;j++)
> {
>   Yi=Yi+(WT[j+1]/WT[j]);
>  }
>
> pero mi pregunta es como hago la productoria? ya que una productoria se 
> van multiplicando todos los numeros
>
> gracias, ojala alguien me responda dentro del dia
>
>
>
> 
Technical Details
Message-ID: <h7erbi$716$1@news.nivel5.cl>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mail
References: <h7egt7$6b4$1@news.nivel5.cl>

Show Full Headers
Complete Article Headers
X-Google-Thread: e499fe1f24,4839c44b46ec2a64
X-Google-Attributes: gide499fe1f24,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mail
From: "tikitaka" <tikitaka@hotmail.com>
Newsgroups: chile.comp.programacion
Subject: Re: problema con for de novato
Date: Sun, 30 Aug 2009 17:35:46 -0400
Organization: Varios
Lines: 49
Message-ID: <h7erbi$716$1@news.nivel5.cl>
References: <h7egt7$6b4$1@news.nivel5.cl>
NNTP-Posting-Host: pc-138-237-239-201.cm.vtr.net
X-Trace: news.nivel5.cl 1251668146 7206 201.239.237.138 (30 Aug 2009 21:35:46 GMT)
X-Complaints-To: news@news.nivel5.cl
NNTP-Posting-Date: Sun, 30 Aug 2009 21:35:46 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response