Write a program that asks the user to input the number of miles and convert the miles to kilometers, and then print the output to the screen.

Identify and analyze the behavior of the offender(s) relative to the psychological history and evaluation of the offender(s).
August 5, 2017
Define the five essential elements of an enforceable contract, and demonstrate how each element relates to your example.
August 5, 2017
Show all

Write a program that asks the user to input the number of miles and convert the miles to kilometers, and then print the output to the screen.

Problem #1

Write a program that asks the user to input the number of miles and convert the miles to kilometers, and then print the output to the screen. (Recall that 1 mi = 1.6093440 km.)

Follow the Engineering problem solving methodology.

–          Problem Statement

–          Input/Output

–          Solve by hand

–          Create pseudo-code Algorithm and C++ code in Visual Studio

–          Test Code with some data and verify

Problem #2

Create a flow-chart of the Algorithm in the previous problem

Problem #3

Find the Value of  h in each of the following problems (Show work when necessary):

Given  a = 3.5    b=1.5  c=9    d=6

a)      h = d < c

b)      h = a >b// b >c

c)      h = d – a > b && a * b < d

Problem #4

Draw a flowchart for the following statements:

a)      if (b <= 4)

y = 2;

else

{

y = 4 + x;

x++;

}

b)      if  (y < 5)

z = 0;

else if (y < 10)

z = 1;

else

z = 2;

Leave a Reply

Your email address will not be published. Required fields are marked *