Wrox Programmer Forums
|
BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3
This is the forum to discuss the Wrox book Beginning C# 3.0 : An Introduction to Object Oriented Programming by Jack Purdum; ISBN: 9780470261293
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 26th, 2008, 07:35 AM
Registered User
 
Join Date: Aug 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Solutions to Exercises

Solution to Exercise 5 of 7th chapter is wrong.The for loop makes 9 iterations instead of 10 because i should be initialized to 0 not to 1;

 
Old September 11th, 2008, 04:25 PM
Friend of Wrox
 
Join Date: Sep 2008
Posts: 234
Thanks: 0
Thanked 32 Times in 30 Posts
Default

The for loop is properly initialized with i = 1, but the relational test in expression #2 should be

    for (i = 1; i <= year, i++)

The reason for i being initialized to 1 instead of the (normal) 0 value is because we need to calculate interest for the first year and a value of 0 produces no interest value.

Sorry for the hiccup.

Dr. Purdum





Similar Threads
Thread Thread Starter Forum Replies Last Post
solutions to exercises in Beginning with Visual C+ snehal267 BOOK: Beginning Visual C++ 6 0 April 17th, 2006 06:18 AM
Java exercises and solutions uddessjava Java Basics 1 March 20th, 2006 11:36 PM
Solutions to exercises? Smyke BOOK: Beginning ASP.NET 1.0 2 January 20th, 2005 10:23 AM
Solutions to exercises forBeg ASP1.0 with VB triscrg ASP.NET 1.0 and 1.1 Basics 0 June 23rd, 2003 09:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.