cs315recur - CS 315 Assignment 2 Recursion and Lists Due...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 315 Assignment 2: Recursion and Lists Due: February 5, 2010. File: Cons.java This assignment may be done in Java or in Lisp. 1. Write a recursive function sumsq(int n) that adds up the squares of the integers from 1 through n . 2. The mathematician Giuseppe Peano (1858 - 1932) showed that all arithmetic operations on natural numbers (nonnegative integers) could be reduced to a single constant (0) and an operation successor , which is available in Java as ++ (in Lisp, 1+ ). Peano was one of the first to use what we now call symbolic logic. He introduced, for instance, the use of the symbols `(E x)' to mean `there is an x such that'; and he habitually wrote out all of his lecture notes in his new symbolism. He was teaching at a military academy at the time, and his students were so incensed by his formalistic approach to mathematics that they rebelled (despite his promises to pass them all) and got him fired. Subsequently he found a more congenial setting at the University of Turin. -- Rudy
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/08/2010 for the course CS 24443 taught by Professor Moore during the Spring '10 term at Université de Versailles-Saint-Quentin-en-Yvelines.

Page1 / 2

cs315recur - CS 315 Assignment 2 Recursion and Lists Due...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online