Fig01_02

Fig01_02 - } /* END */ / public static void main( String [...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
public class Fig01_02 { /* START: Fig01_02.txt */ public static int f( int x ) { /* 1*/ if( x == 0 ) /* 2*/ return 0; else /* 3*/ return 2 * f( x - 1 ) + x * x;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } /* END */ / public static void main( String [ ] args ) { System.out.println( "f(5) = " + f( 5 ) ); } }...
View Full Document

Ask a homework question - tutors are online