#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    2
    Rep Power
    0

    Post Unit conversion (switch)


    I need to write a program using switch statement.
    User needs to convert regular unit to S1 unit. User can choose length, volume or force for the conservation.
    Note that foot=0.3048 m, 1 cubic foot=0.002817 cubic meter, 1 pound =4.4482 newtons.
    So i need to write a pseudocode and need to test the program by entering the length of 3 feet, 2.5 cubic feet and 3.5 pounds.
  2. #2
  3. Java Junkie
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2004
    Location
    Mobile, Alabama
    Posts
    4,022
    Rep Power
    1285
    what is the question
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    2
    Rep Power
    0
    Write a program using switch statement and write its pseudocode based on the information given
  6. #4
  7. Contributing User

    Join Date
    Aug 2003
    Location
    UK
    Posts
    5,116
    Rep Power
    1803
    Simple enough; carry on.

    Come back when you have a problem.
  8. #5
  9. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,931
    Rep Power
    481
    I think you should work with fundamental units. For instance, volume is length cubed. Specifying conversion factors for volume and for length doesn't quite sit right. On the other hand, if you don't know that volume is length cubed you'd need separate factors.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo