Algorithm that returns the smallest value in the array

Assignment Help C/C++ Programming
Reference no: EM13936758

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: EM13936758

Questions Cloud

Discuss the value of visual art for individual and society : Discuss the value of visual art for an individual and society. Analyze the essential relationship between any work of art and the various kinds of influences on the artist and audience that shape the interpretation of the art
Create a class called card player and deck : Write a class called "Card" with the following traits: it holds two private variables, a suit and a value (ace is high). It has public functions that randomly generate and modify the suit, value and print out the suit/value to the screen. Write a ..
Introduce a few areas of programming using c : In this project it was required to write a small Notepad program and it will introduce a few areas of programming using C# (which are very important in many programs), including: Windows Forms and the Event Handling model GUI (Graphical User Inter..
Research on woolworths supermarket : Students must research Woolworth's Supermarket. Students are to write an Integrated CRM Strategy Plan in Report Format.
Algorithm that returns the smallest value in the array : Write an algorithm that outputs the smallest and second smallest values in the array.
Describe the artwork in terms of subject : Describe the artwork in terms of subject, medium, composition, and use of color. Classify the work of art, highlighting the style, movement, and any innovation the artist displayed
Write a program that reads letters from a file : This program should open an inputLet.txt file , read in one character at a time and repeat this for the number of games the user wants to play.
Describe the biological consequences of the protein : Discuss why RNA polymerases are not able to correct base errors during replication or transcription. Describe the biological consequences of the protein that may develop in this case.
Describe three features of a good balanced scorecard : Describe three features of a good balanced scorecard. What are three important pitfalls to avoid when implementing a balanced scorecard? How does an engineered cost differ from a discretionary cost?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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