Rewrite the following pseudocode segment using a loop structure in the specified languages: k = (j + 13) / 27 loop: if k > 10 then goto out k = k + 1 i = 3 * k - 1 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.

Respuesta :

The pseudocode is simply the prototype of the actual program in C, C++, Java, C#, Python or Ruby

The program in C++

The pseudocode written in C++ language is as follows:

#include<iostream>

using namespace std;

int main(){

    int i, j, k;

    cin>>j;

    k = (j + 13) / 27;

    while (k > 10){

    k+=1;    

    i = 3 * k - 1;

    }

    return 0;

}

The program in Python

The pseudocode written in Python language is as follows:

j = int(input())

k = (j + 13) / 27

while (k > 10):

    k+=1    

    i = 3 * k - 1

The program in Ruby

The pseudocode written in Ruby language is as follows:

j = gets.chomp.to_i

k = (j + 13) / 27

while k > 10

    k = k + 1    

    i = 3 * k - 1

The code with the best writability and readability

The code with the best writability is C++ and the code with the best readability is the Ruby

The best combination of the two

The best combination of the two languages is the Python language

Read more about pseudocode at:

https://brainly.com/question/11623795

ACCESS MORE