Question: Redo Programming Exercise 1, except this time make all the variables and constants floating- point type, and change the statement k = k + 1

Redo Programming Exercise 1, except this time make all the variables and constants floating- point type, and change the statement

k = k + 1
to
k = k + 1.2

Data From Exercise 1:

Rewrite the following pseudocode segment using a loop structure in the specified languages:

k = (j + 13) / 27 loop: if k > 10 then goto k = k + 1 i = 3 * k - 1 out goto loop out:

a. C, C++, Java, or C#

b. Python

c. Ruby

Assume all variables are integer type. Discuss which language, for this code, has the best writability, the best readability, and the best combination of the two.

k = (j + 13) / 27 loop: if k > 10 then goto k = k + 1 i = 3 * k - 1 out goto loop out:

Step by Step Solution

3.32 Rating (173 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a b c Do K... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Concepts of Programming Languages Questions!