The process of finding the largest value is used frequently in computer applications.


I need help completing my Ruby Programming assignment.

The assignment is:

The process of finding the largest value is used frequently in computer applications. For example, a program that determines the winner of a sales contest would input

the number of units sold by each salesperson. The salesperson who sells the most units wins the contest. Make a Ruby application that allows a user to input a series of 10 integers and determines and prints the largest integer. Your program should use at least the following three variables:

a) counter: A counter to count to 10 (i.e., to keep track of how many numbers have been input and to determine when all 10 numbers have been processed).

b) number: The integer most recently input by the user.

c) largest: The largest number found so far.

This is what I have so far:

class Screen

 def cls

   puts (“n” * 25)

   puts “a”


 def pause




class Program

 def display_instructions


   puts “INSTRUCTIONS:nn”

   puts “Enter 10 numbers for the program to choose the largest


   print “Press Enter to continue.”



 def get_numbers

   numbers = []

   $counter = 0

   $number = numbers.last

   $largest = numbers.max


     print “nPlease enter a number and press Enter. “

     input = STDIN.gets


    while counter < 10

      print “last number entered is: #{$number} “

      print “The largest number entered is: #{$largest}”

      if counter < 10

        print %Q{Type a number. (Press Enter)nn: }

        input = STDIN.gets

        numbers.push = input

        $counter += 1

      else counter >= 10

        puts “The End.” 






Could you please help me out?

Thank you.

Calculate your essay price
(550 words)

Approximate price: $22

How it Works


It only takes a couple of minutes to fill in your details, select the type of paper you need (essay, term paper, etc.), give us all necessary information regarding your assignment.


Once we receive your request, one of our customer support representatives will contact you within 24 hours with more specific information about how much it'll cost for this particular project.


After receiving payment confirmation via PayPal or credit card – we begin working on your detailed outline, which is based on the requirements given by yourself upon ordering.


Once approved, your order is complete and will be emailed directly to the email address provided before payment was made!