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.

Answers

Answer 1

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


Related Questions

Other Questions
Write a statement that correctly describes the relationship between these two sequences: 2, 4, 6, 8, 10 and 1, 2, 3, 4, 5. C is a circle with centre (0,0)L is a straight line with negative gradient.The circle C and the line L intersect at the points A and B.The coordinates of A are (-9,2)The x coordinate of B is 7Find an equation of L. The flight of javelin released 6.5 feet from the ground at an initial velocity of 68 feet per second is modeled by the function h=-16^2+6.5 where h is the height of the javelin in feet after r seconds . Determine how many seconds it will take the javelin to reach the maximum height and find the maximum height. Round to the nearest hundredth if necessary Write the following in words in international system with comas: 34407615 add suitable position.1. They have been living in this city___2008.2. He will go to school____today.3. The dog was beaten____shyam____a stick.4. On my way to Ajmer,. I shall stay____jaipur for one day.5. The book was found____the bookshelf. Please help I will give brainliest. Select thecorrect answer from each drop-down menu.Who is the speaker in this excerpt from Book 13of Homer's Odyssey, and what inference can you make from the tone?Shall then no more, O sire of gods! be mineThe rights and honours of a power divine?Scorn'd e'en byman, and (oh severe disgrace!)By soft Phaeacians, my degenerate race!Against yon destined head in vain swore,And menaced vengeance, ere he reach'd his shore:To reach his natal shore was thy decree;Mild obey'd, for who shall war with thee?Behold him landed, careless and asleep,From all the eluded dangers of the deep;Lo where he lies, amidst a shining storeOf brass, rich garments, and refulgent ore;And bears triumphant to his native isleA prize more worth than Illion's noble spoil.The speaker in the excerpt isVThe tone demonstrates ................................................ 2) What is an example of a cause-and-effect relationship found in eitherthe timeline or Early American Flight?A)The number of annual commercial flights increasedto 173,000 by 1929.B)The United States Postal Service launched theirairmail service in 1918.C)By completing his flight, Lindbergh earned a medalfrom President Coolidge.D)In 1923, the first transcontinental flight from NewYork to San Diego was made. Factor x^22x. Is this a special product? When a liquid is heated, the average (blank) energy of itsparticles will increase. Two pieces of evidence that show that Tom Robinson didn't commit the crime? Toda [4 MARKS] GROUP D: HIGHER ABILITY (HA) 74.2073 Supp. Q.No. 25 (Density of some substance is given in a table. Study the table and answer the following questions:) (Substances) (Density) X 11 gm/cm Y 8 gm/cm 2Z 0.9 gm/cm i. ? (Which substance will have least volume if equal mases of all are taken?) ii. ? (Which substance will have the least mass if equal volume of all are taken?) iii. ? (Which one will float on water?) Write three possible topic sentence for each topic: internet.war.family Help picture below problem 9 Please help with this problem. Prompt Write a research-based argumentative essay for or against free education for children worldwide.please just give me three reasons why education should be free education for children How is capital deepening related to economic growth? Worldwide, the most common micronutrient deficiency is of:. Work out the size of angle x.