Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: question..

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43866] Re: question..
  • From: kroosu at tref.nl (Okke)
  • Date: Thu, 9 Oct 2003 01:54:49 -0400 (EDT)
  • References: <bm0jfj$pps$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Ghassan Shahin <ghassans at bethlehem.edu> wrote:

> i want to use mathematica for sums..but i need to sum from 1 to 100 
> except same integer numbers, say 2,6,8..what is the code for such a 
> task?

Sum[i,{i,1,100,2}]

or 

a = 0; For[i = 0, i â?¤ 100, i++, a = a + If[OddQ[i], i, 0]];a

-- 
Okke
Experience is that marvelous thing that enables you to recognize a
mistake when you make it again.
-- F. P. Jones


  • Prev by Date: $CommandLine
  • Next by Date: Re: Airy's Gi(x) function; asymptotic matching and asymptotic limits
  • Previous by thread: Re: question..
  • Next by thread: Re: question..