Purchase Solution

C++ Program

Not what you're looking for?

Ask Custom Question

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
. . .

Purchase this Solution

Solution Summary

This posting contains the solution to the given problem.

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Javscript Basics

Quiz on basics of javascript programming language.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

C# variables and classes

This quiz contains questions about C# classes and variables.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.