Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 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 June 10th, 2005, 06:30 AM
Authorized User
 
Join Date: Apr 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default My Homework (I solved it)

Compute two polynominals addition by link list.
Write a progroam compute polynominals addition.
For example:
3x^2 + 4x + 1 and 5x^4 - 6x^2 + x - 3, the result outputs
5x^4 - 3x^2 + 5x - 2.

The input read from a file, which each polynomial is in one line, every two numbers are one term of polynomial, the first is coefficient and the second is exponent. You must implement polynomial by linked list in this program. Your output prints the two polynomials first, and the addition of two polynomial.
(The coefficients and exponents are all integers)

An example of input file:
3 2 4 1 1 0
5 4 -6 2 1 1 -3 0

An example of output:
A(x) = 3x^2 + 4x + 1
B(x) = 5x^4 - 6x^2 + x - 3

A(x) + B(x) = 5x^4 - 3x^2 + 5x - 2
 
Old June 10th, 2005, 11:25 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Eum, can you explain us why *exactly* you want us to do your homework??

Imar





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 5 Homework - Help please satish_appasani BOOK: Professional WCF Programming: .NET Dev with Windows Communication Found ISBN: 9780470089842 0 July 29th, 2008 06:50 AM
problem solved bhavna .NET Framework 1.x 1 March 7th, 2007 12:20 PM
Water Bill Homework DweeLer C++ Programming 10 November 9th, 2005 06:40 PM
Problem Solved. blackdevil1979 Beginning VB 6 0 March 22nd, 2005 09:55 PM
Problem with homework CHPT8,Page265 RABARBAR BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 4 December 17th, 2003 07:27 PM





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