subject
Engineering, 22.02.2020 00:39 laurenec49

Find the error in the following pseudocode.

Module main()

Call raiseToPower(2, 1.5)

End Module

Module raiseToPower(Real value, Integer power)

Declare Real result

Set result = value^power

Display result

End Module

2. Find the error in the following pseudocode.

Module main()

Call getNames()

End Module

Module getNames()

Declare Sting name

Display "What is the name of the first student?"

Input name

Declare String name

Display "What is the name of the second student?"

Input name

End Module

Find the potential error in the following pseudocode.

Module main()

Call setDouble(10.5)

End Module

Module setDouble(Int Ref num)

Set num = num*2

Display num

End Module

Find the error in the following pseudocode.

Module main()

Declare Integer month

Call getMonth()

Display "Your birthday is in month ", month, "."

End Module

Module getMonth()

Display "Enter the month of your birthday"

Input birthMonth

End Module

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
What difference(s) did you notice using a pneumatic circuit over hydraulic circuit.explain why the pneumatic piston stumbles when it hits an obstacle.
Answers: 2
question
Engineering, 04.07.2019 18:20
Derive the correction factor formula for conical nozzle i=-(1+ cosa) and calculate the nozzle angle correction factor for a nozzle whose divergence hal-fangle is 13 (hint: assume that all the mass flow originates at the apex of the cone.
Answers: 3
question
Engineering, 04.07.2019 18:20
What is the heat treatment of metals? what is the benefit of it? why and how it's useful? answer in details, do not write by hand.
Answers: 3
question
Engineering, 04.07.2019 19:10
Agas contained within a piston-cylinder assembly e end nation about same energy states, 1 and 2, where pi 10 bar, v undergoes two processes, a and b, between the sam 0.1 m3, ui-400 kj and p2 1 bar, v2 1.0 m2, u2 200 kj: process a: process from 1 to 2 during which the pressure- volume relation is pv constant process b: constant-volume process from state 1 to a pressure of 2 bar, followed by a linear pressure-volume process to +20 0 state 2 kinetic and potential energy effects can be ignored. for each of the processes a and b, (a) sketch the process on p-v coordinates, (b) evaluate the work, in kj, and (c) evaluate process the heat transfer, in kj
Answers: 2
You know the right answer?
Find the error in the following pseudocode.

Module main()

Call raiseToPower(...
Questions
question
Biology, 16.07.2019 19:00
question
Mathematics, 16.07.2019 19:00
Questions on the website: 13722363