Write program that take indefinite amount of number as input

Assignment Help Programming Languages
Reference no: EM131661966

LAB Assignment: Find the second largest number

Write a program that takes an indefinite amount of numbers as input and outputs the next largest number to the screen after the user is finished entering numbers and would like to exit.

An example of user interaction with the program is shown below:

Please enter a positive number (type -1 to exit): 99
Please enter a positive number (type -1 to exit): 42
Please enter a positive number (type -1 to exit): 73
Please enter a positive number (type -1 to exit): 24
Please enter a positive number (type -1 to exit): 444
Please enter a positive number (type -1 to exit): 324
Please enter a positive number (type -1 to exit): 20
Please enter a positive number (type -1 to exit): -1

The second largest number entered is: 324

The zipped file to turn in must include:

• txt: a brief text file describing the design of your program, i.e. the steps required for the calculation.
• interactive.py: the source code using standard input/output.
• interactive.scr: the typescript file to show that your program works with the example input provided above.

Reference no: EM131661966

Questions Cloud

Calculate a plant-wide overhead rate : Jardine Ltd is developing factory overhead rates for the coming year. Calculate a plant-wide overhead rate based on direct labour hours
Define proper way of how to write a function of an object : Write a function object EqualsK. EqualsK contains one data member (k). EqualsK is constructed with a single parameter (the default is zero).
When you get to the end of your journey : Do a search on your topic. Pick a site or two that looks good...then begin just clicking on links, or modifying your search. Just see where you are taken.
Discuss ways to enhance or optimize health : Health disparities among different segments of the population for the focus area
Write program that take indefinite amount of number as input : Write a program that takes an indefinite amount of numbers as input and outputs the next largest number to the screen after the user is finished entering number
Discuss the key features of organisational policy : Briefly identify and discuss the key features of organisational policy and procedures as they apply to costing systems
Prepare diana healthy journal entries : Prepare Diana Healthy journal entries relating to the above donation by Aron Enterprises - describe how Diana Healthy should record it under the restricted fund
Examine trends over time or to compare the rates : examine trends over time or to compare the rates in different countries. It is quite a different thing to develop explanations
The creation of teen idols is a tradition : What were some of the factors that led to this point in the early 60's? Is it still prevalent? If so, why? Name some examples.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd