Assignment2-3

download Assignment2-3

of 4

Transcript of Assignment2-3

  • 7/25/2019 Assignment2-3

    1/4

    Programming Fundamentals Institute of Computing

    Assignment #2 and Assignment #3

    Assignment 2:

    Make a program that would convert dierent types of unit of measurements.

    The program should have options for types of measurements such asdistance, volume and temperature. Please implement !!"! #$%&'I%( for

    wrong input of choices. )ynta* is shown +elow.

    Choices of Measurements

    . &istance

    -. olume

    /. Temperature

    0ser will choose what to measure on the corresponding integer value of each

    measurement. 12 &istance 1-2 olume1/2 Temperature

    If choice is (1) Distance: User will then e as!ed for an in"ut

    numeric (ie $oating or integer %alue in M&'&)

    nter 'ength 1m23

    0ser will then +e prompted with a choices of the conversions +elow with the

    corresponding integer choices3

    &isplay distance in3

    . 4ilometer

    -. 5ard

    /. Centimeter

    The program should display the output of the speci6c unit of conversion

    depending on the input that was provided +y the user.

    Follow the synta* for the remaining - Choices of Measurements olume and

    Temperature.

    If choice is *olume:

    nter 'ength1m2 3

    nter 7idth1m2 3

    nter #eight1m2 3

  • 7/25/2019 Assignment2-3

    2/4

    Programming Fundamentals Institute of Computing

    &isplay volume in3

    . cu+ic meter

    -. cu+ic centimeter

    /. cu+ic inch

    If choice is 'em"erature:

    nter Temperature 1celsius2 3

    &isplay temperature in3

    . Fahrenheit

    -. 4elvin

    am"le +rogram ,ut"ut:

  • 7/25/2019 Assignment2-3

    3/4

    Programming Fundamentals Institute of Computing

    Assignment 3

    Create a program that will ask a user an input integer as the 6rst term of the

    Fi+onacci se8uence and an input integers as the length of the se8uence. The

    program should output the se8uence depending on the length given +y the

    user.

    umission Instructions (-ailure to follow merits re.ection of

    sumission):

    Deadline: /anuar0 23 efore 1+M

    File naming format e*ample3 'astnameF%I9$ssign-.cpp and

    'astnameF%I9$ssign/.cpp

    NOTE: File naming may vary per section MATH and STAT will follow

    the B !A"# format $%st li&e yo%r previo%s s%'mission forAssignment () BSEd*Math will follow the +,A#TET format for -le

    naming as per yo%r previo%s s%'mission

    7rite your full name:s as a C;; comment in the 6rst line of the

    code.

  • 7/25/2019 Assignment2-3

    4/4

    Programming Fundamentals Institute of Computing

    gmail.comwith the following

    su+?ect header per section3Math@9A)e&