3 Replies - 3823 Views - Last Post: 17 December 2006 - 01:11 AM Rate Topic: -----

#1 xcom2001  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 08-December 06

Basic programming help

Posted 08 December 2006 - 10:23 AM

In my class I have been asked to design an algorithm for a converter that converts units in Metric to English and vice versa using pseudocode.

Can anyone help me with this. I think that if I had an example to work with I could better understand how all this works.

Thank You
Is This A Good Question/Topic? 0
  • +

Replies To: Basic programming help

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: Basic programming help

Posted 08 December 2006 - 10:37 AM

IF conversion is Metric To English
   Multiply original value BY conversion rate
End IF

IF conversion is English to Metric
   Multiply original value BY conversion rate
End IF


Of course you'll need to beef it up a little....flesh it out with further details
Was This Post Helpful? 0
  • +
  • -

#3 xcom2001  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 08-December 06

Re: Basic programming help

Posted 08 December 2006 - 09:44 PM

View PostAmadeus, on 8 Dec, 2006 - 10:37 AM, said:

IF conversion is Metric To English
   Multiply original value BY conversion rate
End IF

IF conversion is English to Metric
   Multiply original value BY conversion rate
End IF


Of course you'll need to beef it up a little....flesh it out with further details


Thanks Amdeus but this where my problem exist I don't know what goes in between. This an introductory class to programming and on day 1 I am being asked to do something that I have no basic knowledge to complete it's like that old saying putting the cart before the horse. Could you just this once tell me what the whole code would look like.

Thank you
Was This Post Helpful? 0
  • +
  • -

#4 KeyWiz  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 8
  • View blog
  • Posts: 438
  • Joined: 26-October 06

Re: Basic programming help

Posted 17 December 2006 - 01:11 AM

I believe what you are being asked to do is layout the logical steps and a formula YOU would follow to convert from one standard to the other. Before we can solve a problem with programming we must know how to solve the problem ourselves, this is where you must start. Define what you need to have the computer accomplish.
example:

Take a metric lenth value
multiply by a conversion value
print the result
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1