Re: Need i need a programmer
On 18 Oct, 10:56, zohaib.shir...@gmail.com wrote:
> i have got a quizz to [...]
the idea of a "quiz" is for *you* to do the work
> write a programm that gives the sum of all even
> numbers between two variables x and y and then displays the sum.
> Include both x and y in the total sum.
>
> Any one here can me............ ?
in NAPSIC (Nick's All Purpose Symbolic Instruction Code)
DEFINE print_sum_evens (INTEGER x, y)
INTEGER sum <- 0;
FOR ALL i IN RANGE (x, y)
IF is_even (i)
sum <- sum + i
END
END
PRINT sum
END
--
Nick Keighley
|