Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'For loop (new to this)' topicStudent Support Forum > General > Archives > "For loop (new to this)"

Next Comment >Help | Reply To Topic
Author Comment/Response
08/14/12 8:12pm

As I am new to this please bear with me.
If you can help me with the following:
As an output of the Print command, I am getting the two integrals evaluated. I would like instead the sum of these integrals. In the particular example below for example I am getting two can I get the sum of these. I am new to programming and having difficulty in indexing the correct way.Thank you

For[i = 1; p = (100 - t)/(100 - r), i < 3, i++,
p = (1 - p)*((100 - t)/(100 - r));
Print[Assuming[0 < t < 100, (1/100)*Integrate[r*p, {r, 0, t}]]]]

URL: ,

Subject (listing for 'For loop (new to this)')
Author Date Posted
For loop (new to this) Kevin 08/14/12 8:12pm
Re: For loop (new to this) Bill Simpson 08/14/12 10:16pm
Re: Re: For loop (new to this) Kevin 08/15/12 8:35pm
Next Comment >Help | Reply To Topic