Question

In: Computer Science

can someone please check this code? – Enter Quantity of Numbers Design a program that allows...

can someone please check this code?

– Enter Quantity of Numbers

Design a program that allows a user to enter any quantity of numbers until a negative number is entered. Then display the highest number and the lowest number.

For the programming problem, create the pseudocode and enter it below.

Enter pseudocode here

start

    Declarations

          num number

          num high  

          num low

            

housekeeping()

    while number >=0

detailLoop()

     endwhile

     finish()

stop

housekeeping( )

          output ”Enter a number>”

          input number

          return

detailLoop()

    if number > high then

          high = number

   else

      if number < low then

          low = number

       endif

endif

output “Enter a number”

input number

         

return

finish()

   output “High number is”, high

   output “Low number is”, low

    output “Program ended”

return

Solutions

Expert Solution

start

    Declarations

          num number

          num high  

          num low

housekeeping()

high=number

low=number

while number >=0

detailLoop()

  endwhile

     finish()

stop

housekeeping( )

          output ”Enter a number>”

          input number

return

detailLoop()

    if number > high then

          high = number

   else

      if number < low then

            low = number

       endif

endif

output “Enter a number”

input number

return

finish()

   output “High number is”, high

   output “Low number is”, low

    output “Program ended”

return

  


Related Solutions

can someone please check the code below? Thank you Hunterville College Tuition Design a program for...
can someone please check the code below? Thank you Hunterville College Tuition Design a program for Hunterville College. The current tuition is $20,000 per year. Allow the user to enter the rate the tuition increases each year. Display the tuition each year for the next 10 years. For the programming problem, create the pseudocode and enter it below. Enter pseudocode here start     Declarations             num tuition             num year                         num TOTAL_YEARS = 10             num INCREASE_RATE...
can someone please check the code below? Thank you Hunterville College Tuition Design a program for...
can someone please check the code below? Thank you Hunterville College Tuition Design a program for Hunterville College. The current tuition is $20,000 per year. Allow the user to enter the rate the tuition increases each year. Display the tuition each year for the next 10 years. For the programming problem, create the pseudocode and enter it below. Enter pseudocode here start     Declarations             num tuition             num year                         num TOTAL_YEARS = 10             num INCREASE_RATE...
Design the logic for a program that allows a user to enter 20 numbers, then displays...
Design the logic for a program that allows a user to enter 20 numbers, then displays them in the reverse order of entry. Design the logic for a program that allows a user to enter 20 numbers, then displays each number and its difference from the numeric average of the numbers entered. The program is C++. I need a Pseudocode
Please write the code JAVA Write a program that allows the user to enter the last...
Please write the code JAVA Write a program that allows the user to enter the last names of five candidates in a local election and the number of votes received by each candidate. The program should then output each candidate’s name, the number of votes received, and the percentage of the total votes received by the candidate. Your program should also output the winner of the election. A sample output is: Candidate      Votes Received                                % of Total Votes...
I have a problem with my code. It does not run. Please can someone check the...
I have a problem with my code. It does not run. Please can someone check the code and tell me where I went wrong? This is the question: Program Specification: Write a C program that takes the length and width of a rectangular yard, and the length and width of a rectangular house (that must be completely contained in the yard specified) as input values. Assuming that the yard has grass growing every where that the house is not covering,...
Design a modular program which asks the user to enter a list of numbers. The numbers...
Design a modular program which asks the user to enter a list of numbers. The numbers must be stored in an array. The program then finds the index of the first occurrence of the smallest element in the array and the last occurrence of the largest element in the array. The program displays the position and value of each of these items.
Using Pseudocode: Design a program that allows the user to enter 20 names into a String...
Using Pseudocode: Design a program that allows the user to enter 20 names into a String array. Sort the array in ascending (alphabetical) order and display its contents.
Design a complete program that asks the user to enter a series of 20 numbers. The...
Design a complete program that asks the user to enter a series of 20 numbers. The program should store the numbers in an array and then display each of the following data: I. The lowest number in the array II. The highest number in the array III. The total of the numbers in the array IV. The average of the numbers in the array *PYTHON NOT PSUEDOCODE AND FLOW CHART!!!!*
Write Java code that allows a user to repeatedly enter numbers. Each time the user enters...
Write Java code that allows a user to repeatedly enter numbers. Each time the user enters a number, the program should print out the average of the last 3 numbers (or all numbers if 3 or less have been entered). I would like a detailed explanation so that a beginner level Java programmer could understand.
can someone code this problem please? Introduction Students will create a C++ program that simulates a...
can someone code this problem please? Introduction Students will create a C++ program that simulates a Pokemon battle mainly with the usage of a while loop, classes, structs, functions, pass by reference and arrays. Students will be expected to create the player’s pokemon and enemy pokemon using object-oriented programming (OOP). Scenario You’ve been assigned the role of creating a Pokemon fight simulator between a player’s Pikachu and the enemy CPU’s Mewtwo. You need to create a simple Pokemon battle simulation...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT