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...
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...
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.
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...
Python programming: can someone please fix my code to get it to work correctly? The program...
Python programming: can someone please fix my code to get it to work correctly? The program should print "car already started" if you try to start the car twice. And, should print "Car is already stopped" if you try to stop the car twice. Please add comments to explain why my code isn't working. Thanks! # Program goals: # To simulate a car game. Focus is to build the engine for this game. # When we run the program, it...
Can someone check to see if anything needs to be changed from this code? The instructions...
Can someone check to see if anything needs to be changed from this code? The instructions are confusing and I'm not sure if this fulfills everything because my compiler won't run it properly. DIRECTIONS: In this project we will develop classes to implement a Day Planner program. Be sure to develop the code in a step by step manner, finish phase 1 before moving on to phase 2. Phase 1 The class Appointment is essentially a record; an object built...
Please code in C language. Server program: The server program provides a search to check for...
Please code in C language. Server program: The server program provides a search to check for a specific value in an integer array. The client writes a struct containing 3 elements: an integer value to search for, the size of an integer array which is 10 or less, and an integer array to the server through a FIFO. The server reads the struct from the FIFO and checks the array for the search value. If the search value appears in...
Please write in Python code please: Write a program that asks the user to enter 5...
Please write in Python code please: Write a program that asks the user to enter 5 test scores between 0 and 100. The program should display a letter grade for each score and the average test score. You will need to write the following functions, including main: calc_average – The function should accept a list of 5 test scores as an input argument, and return the average of the scores determine_grade – The function should accept a test score as...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT