How would i make this work?

  • (2 Pages)
  • +
  • 1
  • 2

20 Replies - 538 Views - Last Post: 31 January 2018 - 05:41 PM Rate Topic: -----

#16 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13766
  • View blog
  • Posts: 54,945
  • Joined: 12-June 08

Re: How would i make this work?

Posted 13 January 2018 - 04:48 PM

I am not sure why you would try that.. it doesn't quite make sense.

Perhaps you want to divide the 'square feet gallon' variable by the 'roomArea - (windowArea + bookshelfArea + doorArea)' bit. Perhaps put that bit in parenthesis so it works out first BEFORE the division.
Was This Post Helpful? 0
  • +
  • -

#17 jaredjamesthewizard  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 13-January 18

Re: How would i make this work?

Posted 13 January 2018 - 04:58 PM

would it be like this?

paint = roomArea - (windowArea + bookshelfArea + doorArea)/SquareFeetGallon;
Was This Post Helpful? 0
  • +
  • -

#18 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13766
  • View blog
  • Posts: 54,945
  • Joined: 12-June 08

Re: How would i make this work?

Posted 13 January 2018 - 04:59 PM

Not quite.
Was This Post Helpful? 0
  • +
  • -

#19 jaredjamesthewizard  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 13-January 18

Re: How would i make this work?

Posted 13 January 2018 - 05:03 PM

paint = (roomArea - SquareFeetGallon)/(windowArea + bookshelfArea + doorArea);
would it be this?
Was This Post Helpful? 0
  • +
  • -

#20 ndc85430  Icon User is offline

  • I think you'll find it's "Dr"
  • member icon

Reputation: 709
  • View blog
  • Posts: 2,887
  • Joined: 13-June 14

Re: How would i make this work?

Posted 13 January 2018 - 11:40 PM

That doesn't really make sense either: roomArea and SquareFeetGallon have different units, so you can't subtract them. Think about doing dimensional analysis: your area has dimensions of ft^2 and SquareFeetGallon has dimensions of ft^2 gal^-1 and the result you want has dimensions of gal. It should be quite simple to see how to combine the two quantities to form one with the correct dimensions.
Was This Post Helpful? 1
  • +
  • -

#21 tony jay  Icon User is offline

  • New D.I.C Head

Reputation: 18
  • View blog
  • Posts: 46
  • Joined: 31-January 18

Re: How would i make this work?

Posted 31 January 2018 - 05:41 PM

This is a great example of a fundamental truth:
If one does not understand the problem then one cannot code a solution.

The primary problem that I see is that you do not understand the mathematics!
Can you solve this problem on the back of an envelope?
Have you tried?
It should be easy, bordering on the trivial.
Until you can do this any attempt to code a solution is doomed to failure...

For what it is worth I knocked up a solution in C++ in 5 minutes.
The coding was trivial because I understood the maths...

BTW I am no C++ guru, but I am trying to work on this.
Was This Post Helpful? 1
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2