Wrox Programmer Forums
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming 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
  #1 (permalink)  
Old January 28th, 2004, 06:19 AM
Authorized User
Join Date: Jul 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default calculator

I am making a calc. in c++.

can anyone tell me the logic to solve a+b*(c+d) in c/c++

Reply With Quote
  #2 (permalink)  
Old January 28th, 2004, 01:09 PM
Authorized User
Join Date: Dec 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts

As far as I understand your question you have written it correctly but take care:

x = a+b*(c+d);
is not the same as
x = (a+b)*(c+d);

Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
calculator mojtaba rashidi Visual Studio 2005 0 March 17th, 2008 07:29 AM
Calculator DweeLer Other Programming Languages 1 November 18th, 2005 08:13 AM
Investment calculator - help activexcode Classic ASP Basics 5 October 3rd, 2004 10:23 AM

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