Write down an algorithm that returns the smallest value

Assignment Help Computer Engineering
Reference no: EM1331356

Using the following Array,

S = { -55.985, 14.75, .00049, 35.42, -.00049, 883.03, 19.03 }

use code (the language of your choice) to write a program to do the following Exercises

Problem 2 : Write an algorithm that returns the smallest value in the array. Use a for loop

Problem 3: Write an algorithm that outputs the largest ans second largest values in the array.

Problem 4s : Write an algorithm that outputs the smallest and second smallest values in the array.

Problem 5: Write an algorithm that outputs the smallest and largest values in the array.

When you write your program, you can let one program do all of the problems (as opposed to writing four separate programs) by using a separate function/method to handle each of the problems listed above (e.g., a method named "probFour( )" to do Exercise 4s, and a method named "probThree()" to do problem 3, etc.)

Program Output:
Have your program output the answers as follows:

Answer to Problem 2: blah, blah
Answer to Problem 3: blah, blah

Reference no: EM1331356

Questions Cloud

Explain how much utility will the marginal dollar yield : Explain how much utility will the marginal dollar yield.
Prepare a project plan that covers all project groups : Prepare a project plan that covers all project groups and knowledge areas and Prepare project plans that integrate project procurement and contracting activities across project groups
More hours or fewer when offered a higher hourly salary : you select to work more hours or fewer when offered a higher hourly salary.
Creation of an evaluation system : Explain how you would proceed with the creation of an evaluation system and List the types of intervention you would design and ask the company to implement to address this issue.
Write down an algorithm that returns the smallest value : Write down an algorithm that outputs the smallest and second smallest values in array.
Explain how a voluntary exchange result : Explain how a voluntary exchange results in a win/win situation to both parties.
Indicators of strategic hrm effectiveness : Indicators of strategic HRM effectiveness - Find an article through ProQuest that discusses the proposition that HRM adds value to the firm.
A strong behaviorist approach to learning focuses : A strong behaviorist approach to learning focuses on discrete tasks that are built up until they become a complex behavior.
Resource challenges and independent contractors : Resource Challenges and Independent Contractors - What are the negatives and positives when using independent contractors for projects

Reviews

Write a Review

Computer Engineering Questions & Answers

  What is involved in the project scope management

why is good project scope management so important on information technology projects.

  What is missing, incomplete, inaccurate

Email clients have to enable SSL encryption both for POP and SMTP. That way regardless of where we work, our email traffic would not expose any data to network eavesdropping techniques.

  How term "educational technology" covers a wide range

The word "educational technology" covers a wide range of tools and methods exploiting computers, networks and media for delivering knowledge. Compare virtual classes with minimum  two other delivery methods (TV-based courses, on-site company trai..

  Imagine that the array is unsorted

Write down a method, removeAll, that takes three parameters: an array of integers, the length of the array, and an integer, say, removeItem. The method should find and delete all occurrences of removeItem in the array.

  What are the strengths and weaknesses

Explain the difference between managing users in the workgroup environment versus in a domain environment.

  Define the use of contractions, slang and icons

Does the use of contractions, slang and icons in text messaging and email signal the development of a new communication style, or just the death of appreciation of written language.

  Accessing and reading a mouse

Accessing and reading a mouse

  Make a set of powerpoint slides

make a set of PowerPoint slides.

  What are the advantages of using the scsi devices

What will be different about performing a hard-drive-to-tape backup with IDE devices and with SCSI devices? What are the advantages of using SCSI devices over IDE devices for the backups.

  How to redesign the coding design

How to redesign the coding design? Write down a sentence for each change you have optional, indicating what data entry problem (from part a) change will eliminate.

  Add items to the arraylist

Add items to the ArrayList, one at a time, based on user typed input. The user will be prompted for the String to be stored in the ArrayList and then hit enter. The user would be able to continue to add items to the ArrayList until they just hit e..

  Wireless networking

Explain the origins/genesis of the wireless networking. Explain the devices included used and how they operate.

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