Write a program that takes a set of numbers and determines which is the smallest. Ask the user for the following information, in this order: A terminating value (real number). The user will enter this value again later, to indicate that he or she is finished providing input. A sequence of real numbers. Keep asking for numbers until the terminating value is entered.

Answers

Answer 1

Answer:

This solution is implemented in C++:

#include<iostream>

#include<bits/stdc++.h>

using namespace std;

int main(){

double termnum;

cout<<"Terminating number: ";

cin>>termnum;

 

double num;

vector<double>numbers;

cout<<"Number: ";

cin>>num;

while(num!=termnum){

numbers.push_back(num);

cout<<"Number: ";

cin>>num;

}

double smallest = numbers.at(0);

for(double x:numbers){

 if(x < smallest){

  smallest = x;

 }

}

 

cout<<"The smallest is "<<smallest;

return 0;  

}

Explanation:

This declares the terminating variable as double

double termnum;

The next italicized lines prompts user for terminating value

cout<<"Terminating number: ";  

cin>>termnum;

This declares the user input variable as double  

double num;

This declares vector of numbers as double

vector<double>numbers;

The next italicized lines prompts user for number

cout<<"Number: ";

cin>>num;

The following iteration is repeated until the terminating value equals the number supplies by the user

while(num!=termnum){

This pushes the number to a vector

numbers.push_back(num);

The italicized lines prompts user for another number

cout<<"Number: ";

cin>>num;

}

This declares and initializes variable smallest

double smallest = numbers.at(0);

The following for loop determines the smallest of the number set

for(double x:numbers){

 if(x < smallest){

  smallest = x;

 }

}

 This prints the smallest of the set

cout<<"The smallest is "<<smallest;

return 0;

Also: See attachment


Related Questions

draw internal architecture of computer​

Answers

Answer:

If this is good, let me know in the comments and I'll draw it

Explanation:

The default for automatic replies in outlook is what?

Answers

Answer:

The default for automatic replies in outlook is turned off, so the user has to turn it on in order to use it.

Out.look is a program developed by Micro.soft for managing e-mails, being together with G.mail one of the most used worldwide. As in most of these programs, you can configure automatic responses in order to give a quick and generic response to certain types of messages (or even all). Now, this option is disabled by default, so the user must activate it through the configuration of the email box.

The default for automatic replies in Outlook is

disabled

It is best to

schedule  automatic replies.

Automatic replies may validate your

email  to spammers.

Automatic reply rules are for

conditional  settings like forwarding a message to a coworker.

Wrtie down some containerization technology.

Answers

Answer:

Some containerization technologies are listed as follows: Docker, Docker Enterprise, Amazon Elastic Container Service, Container Linux, Amazon's AWS, Microsoft's Azure Container, etc.

Explanation:

Containerization technology is a computer technology that packages software codes and their dependencies in isolated user spaces called containers so that the software can run uniformly and consistently on any infrastructure, using a shared operating system.  It is the modern alternative and companion to virtualization.  In simple terms, containerization is the process which packages an application with the required libraries, frameworks, and configuration files so that it can efficiently run in various computing environments.

Which of the following variable names follows the rules for naming variables?
A. snack $
B. favorite_snack
C. lunch time
D. 15 minute snack

Answers

D. 15 minute snack
Sorry if wrong

Write a function called quadruple that quadruples a number and returns the result. Then make several calls to the quadruple function to test it out.

For example, if you made a call like

x = quadruple(3)
then x should hold the value 12.

Print the value of x to verify your function works correctly.

(CODEHS, PYTHON)

Answers

def quadruple(n):

   return n*4

print(quadruple(3))

print(quadruple(1))

print(quadruple(2))

I wrote my code in python 3.8. I hope this helps.

/kwɒdˈruː.pəl/ to increase by four times, or to multiply anything by four: In the past ten years, the college's enrolment has increased by a factor of four.

What is the role of quadruple that quadruples a number?

Finding the array's four maximum and four minimum components is another method for locating the quadruple with the highest product. And then supply the maximum of these three product values, which will result in a quadrupled maximum product.

When ordering a quadruple-shot latte, which contains four shots of espresso, you can also use the word quadruple to signify “four times as many.” The suffix quadric-, which means “four,” is the source of the Latin root quadruple, which means “create fourfold.”

Three address codes are also referred to as quadruples. Using pointers to entries in a symbol table as the operands and an enumerated type to represent the operations, quadruples can be accomplished.

Therefore, One operation and up to three operands are divided into four fields in a quadruple.

Learn more about quadruples here:

https://brainly.com/question/7966538

#SPJ2

If you can answer theses ill give u a brainliest (i think thats how u spell it) but only if u get it right u will get one NOT A SCAM!!

Question: In which logical operator at least one condition has to be true?

O or

O None of the above

O not

O and

Question: In which logical operator both conditions must be true?

O and

O or

O not

O None of the above

Answers

Answer:

or / and

Explanation:

i took the quiz at unitek college

Answer:

1. or

2. and

Explanation:

Which are the steps in the process of creating a database

Answers

Answer:

Determine the purpose of your database. ...

Find and organize the information required. ...

Divide the information into tables. ...

Turn information items into columns. ...

Specify primary keys. ...

Set up the table relationships. ...

Refine your design. ...

Apply the normalization rules.

Answer:

identifying fieldnames in tables

defining data types for field names

Explanation:

sorry I'm late. future Plato users this is for you

Question 57 Which type of application attack would include User denies performing an operation, attacker exploits an application without trace, and attacker covers her tracks

Answers

Answer:

Auditing and logging

Explanation:

Auditing and logging is a form of application threats and attacks that an application security is susceptible to. It involves a user denies performing an operation; attacker exploits an application without trace, and at the same time attacker covers his or her tracks.

To prevent this, an Auditing and logging countermeasure should be put in place of application security to guide against such aforelisted threats and attacks before its actual occurrence.

Therefore, in this case, the correct answer is "Auditing and logging."

Which example can be used to perform a binary search?

Answers

Answer:

In any case, binary search can be used to solve more extensive scope of problem, for example, finding the next smallest or next-biggest element in an array comparative with the target regardless of whether it is present or missing in the array.

Explanation:

In computer science, binary search, otherwise called logarithmic search, is a search calculation that finds the position of an objective incentive inside an arranged array. Binary search compares  the  target value to the center component of the array. In the event that they are not equivalent, the half in which the value can't lie is dispensed with and the search proceeds on the other half, again taking the center value to contrast with the target value, and continues this until the target value is found. On the off chance that the search ends with the other half being empty, the target value isn't in the array.

Binary search is quicker than linear search aside from small arrays. Nonetheless, the array should be arranged first to have the option to apply  binary search. There are particular data structures intended for quick looking, for example, hash tables, that can be looked through more effectively than binary search.

Buying a new computer for which of these reasons is most likely a sound
financial decision?
A. You liked the ad for it on TV.
B. You need it to do your homework.
O c. Your friend has one.
D. You were persuaded by a salesperson.

Answers

Answer:

b. you need it to do your homework

Explanation:

a term to describe article that can be displayed in their entirety as opposed to abstract and reference only?​

Answers

Answer:

would it be term and tequnique?

Explanation:

oooooooo

how many usable host addresses are available for each subnet when 4 bits are borrowed from a class C IP address

Answers

Answer:

The answer is "14".

Explanation:

Let the IP address [tex]= 196.45.204.0[/tex]

When it borrowed 4 bits

[tex]\therefore\\\\ subnet = 28[/tex]

[tex]IP= \frac{196.45.204.0}{28}\\\\ 28 \to 11111111.11111111.11111111.11110000[/tex]

If the borrowed bits are left out then:

The Number of useable host addresses:

[tex]= {(2^4) - 2} \\\\ = 16-2\\\\ =14[/tex]

What property can we use to check if a string matches a regular expression?


A. match

B. isEqual

C. isSimilar

D. equal

E. matched


I probably won't be able to see the answer in time but I hope this'll help anyone else

Answers

Answer:

A.Match

Explanation:

Plato

The property that can be used to check if a string matches a regular expression is match. The correct option is A.

What is a regular expression?

Simple characters, like /abc/, or a mixture of simple and special characters, like /ab*c/ or /Chapter (d+).d*/, make up a regular expression pattern. Parentheses, which serve as a storage mechanism, are employed in the final illustration.

A string of characters called a regular expression is used to search for patterns. It is primarily used for string matching, pattern matching with strings, etc. They are a general method of matching patterns to character sequences.

The phrase "regular expression" derives from theories in mathematics and computer science and refers to the regularity of mathematical expressions. The earliest grep tools employed text patterns that were regular expressions in a mathematical sense.

Therefore, the correct option is A. match.

To learn more about regular expression, refer to the link:

https://brainly.com/question/17255278

#SPJ5

joe Hubb does not have a secure workplace to do payroll and store confidential records in the store. He uses a space in his home exclusively for this purpose and documents the use thoroughly. What form is used to calculate his office in the home deduction

Answers

Answer:

Joe Hubb can use Form 8829 to calculate his office in the home deduction.

Explanation:

Based on the scenario, Joe is a self-employed taxpayer.  Self-employed taxpayers who are filing IRS Schedule C, Profit or Loss from Business (as Sole Proprietorship) calculate their 'Expenses for Business Use of Home' on Form 8829.  The expenses that are deductible include costs of electricity, heating, maintenance, cleaning supplies, and minor repairs, but only the business-use portions.

please help

Write a method that takes 5 ints as parameters and returns the average value of the 5 ints as a double.

This method must be named average() and it must have 5 int parameters. This method must return a double.

Calling average(1, 5, 7, 4, 10) would return 5.4.

Answers

Answer:

Answered below

Explanation:

This solution is written in Kotlin programming language.

fun average (a: Int, b: Int, c: Int, d: Int, e: Int) : Double {

#variable to hold the addition of all parameters

var sum = a + b + c + d + e

#variable to hold the average of sum

var avg = sum / 5

return avg

}

#call the function to see how it works.

# this operation is done in the fun main()

var test: Double = average ( 5, 4, 7 , 3, 9)

print (test)

Consider a file/directory with the following info:

-rwxr-x--x 1 milk milk 1858 May 1 16:29 abc

Which of the following statement(s) is/are true for the file/directory? Pick ONE OR MORE options

a. abc is a directory.
b. The group the owner belongs to can read and execute abc.
c. All other users can execute abc.
d. The owner can not execute abc.

Answers

Answer:

The statement that is true for the file/directory is:

a. abc is a directory.

Explanation:

A file directory is a computer filing system with cataloging and referencing structure to computer files and other directories.  Also known as folders or drawers, directories are like the workbench or traditional office filing cabinet.  Information is stored in files, which are then stored in directories (folders). Directories can also store other directories to form a directory tree.

"abc" is a directory. A further explanation is below.

A file directory would be a type of computer organizing system that provides cataloging and reference architecture for computer records as well as other directories.Files have been used to hold knowledge, which would be subsequently organized into directories. Additional directories could be stored in directories just to construct its hierarchy.

Thus the above approach is right.

Learn more about the directory here:

https://brainly.com/question/7007432

A pitch is used to bury your screenplay? True or false

Answers

The correct answer for your question would be true

What is the difference between a programming language and natural (every-day) language?

Answers

Natural languages are used for communication between people

Problem decomposition means
O Fixing the problem
O Solving the problem
O Breaking down tasks into smaller, manageable parts
0 None of the above
PLEASE HELPPPPPP

Answers

Answer: Breaking down tasks into smaller, manageable parts

Explanation:

The word decomposition means to break down so Problem decomposition means to break down the problem being faces into smaller parts with the reason being to be able to manage it better.

Some problems are simply too large to handle singularly because of the amount of resources that would have to be devoted. It would be better to break them down into smaller tasks that can then be be confronted one at a time with enough resources to solve them each.

Rita tried unsuccessfully to open a PDF file attachment in her Inbox by double-clicking the attachment in the Reading Pane. What is the most likely reason that the file would not open properly? The PDF attachment should have been right-clicked. PDFs are too large to be sent through most e-mail systems. An add-in for PDFs was not set up in the system. Outlook never accepts PDF files as attachments.

Answers

Answer:

3rd option

Explanation:

The illegal copying of program​

Answers

Answer:Software piracy

Explanation:

Can you sort by reading the string in reverse in python?

Answers

Explanation:

# Let our string is brainlycom

Main = "brainlycom"

# First we will print the original string.

print("The original string : " + str(Main))

#Now Reverse Sort a String

Reverse_Sort= ''.join(sorted(Main, reverse=True))

print("String after reverse sorting : " + str(Reverse_Sort))

After running the above code you will get the result:

The original string : brainlycom

String after reverse sorting : yronmlicba

Name one characteristic of natural languages that prevents them from being used as programming languages.

Answers

Answer:

Ambiguity.

Explanation:

Natural language of human beings are believed to be ambiguous, as it often required settings punctuation, and intonation to determine certain meanings correctly.

Also is the fact that natural language sometimes has more than one meaning for the same words.

Hence, one characteristic of natural languages that prevent them from being used as programming languages is AMBIGUITY.

Universal Container wants to understand all of the configuration changes that have been made over the last 6 months. Which tool should an Administrator use to get this information

Answers

Answer:

Set up audit trail

Explanation:

The administrator should set up an audit trail in order to get this information.

An audit trail would give him the record of all the configuration changes that have been made in a file or a database in the last 6 months.

Audit trails can be manual or electronic. It provides history and also documentation support. It can authenticate security and also help to mitigate challenges.

In REPL.it, the interface includes an Editor and an Interpreter.
True
False

Answers

Answer:

Its true.

Explanation:

How many minutes are there from 8:00 am to 1:00 pm?

Answers

Well it’s 5 hours so you take 5 times 60m for each hour and you get 300m

Answer:300 minutes

Explanation:

from 8 to 1 is 5 hours so you do 5*60= 300

Which of the following terms best describes the product development life cycle process?
descriptive
iterative
Static
evaluative

Answers

Answer:

D

Explanation:

Evaluative

An array similar to a phone book has 1000 names arranged as names [0], names[1]....names[999]. Nancy wants to search a name X in this array. Which of the following preconditions must she ensure to perform a binary search?

The list has a large number of names.
The name X is present in the list.

In addition to the two statements above, which of the following is correct?

a. There should be no duplicates in the list.
b. The names in the list should be alphabetical order.
c. The name X should occur near the middle of the list.

Answers

Answer:

Preconditions that she must ensure to perform a binary search are:

The list has a large number of names.

The name X is present in the list.

c. The name X should occur near the middle of the list.

Explanation:

Nancy's binary search for a name X should begin by comparing an element in the middle of the array or list with the name X (target value). If this name X's value matches the value of an element in the list, Nancy must return its position in the array.  If the name X's value is less than the element's value, Nancy will continue the search in the lower half of the array.  Usually, the name X should occur near the middle of the list or array.

Complete the getOdds method so it returns a new ArrayList of Integers containing all odd Integers from the parameter ArrayList vals in the order they originally appeared. The contents of vals should not change. For example if an ArrayList containing the Integers 2, 5, 8, 6, 7, 3, 12 in that order is passed as a parameter to getOdds, it should return an ArrayList containing the Integers 5, 7, 3 in that order. Write your getOdds method in the U7_L2_Activity_Three class. Use the runner class to test your method but do not add a main method to your U7_L2_Activity_Three.java file or your code will not be scored correctly.

Answers

Answer:

Answered below

Explanation:

//Program is written in Java programming language.

public ArrayList<Integer> getOdds( ArrayList<Integer> list){

// Create variables to hold the new list and the //indexes.

int i;

ArrayList<Integer> oddList = new ArrayList<Integer>()

//Loop over the list and add every odd element // to the new list

for ( i = 0; i < list.length; I++){

if ( list[i] % 2 != 0){

oddsList.add(list[i])

}

}

return oddList;

}

Which of these are true? Check all that apply.

a. You can have many processes running for one program.
b. A program is a process that is executed. A process is a program that we can run.
c. A program is initially stored in RAM. A process is initially stored in the hard drive.
d. A program is an application that we can run. A process is a program that is executed.

Answers

Answer:

The following are true according to the process and the information which is  being implemented.

b. A program is a process that is executed. A process is a program that we can run.

c. A program is initially stored in RAM. A process is initially stored in the hard drive.

d. A program is an application that we can run. A process is a program that is executed.

Explanation:

Statements that are true as regards how programs and the information is  being implemented are;

A program is a process that is executed. A process is a program that we can run.A program is initially stored in RAM. A process is initially stored in the hard drive.A program is an application that we can run. A process is a program that is executed.

According to the question we are to discuss program and its implementation and how it is been run.

As a result of this we can see that program is an application that we can run. A process is a program that is executed.

Therefore, program is a process that is executed. A process is a program that we can run..

Learn more about program at;

https://brainly.com/question/16397886

Other Questions
I NEED HELP!!! How did Southern society influence the social and political conditions prior to the Civil War? How did Washington solve the problem of Native American attacks in the northwest ? What is the solution set for the inequality.t - 10 7A{18, 19, 20, 21}B{17, 3, 14, 25}C{17, 20, 30, 44}D{8, 11, 15, 17} a. The sum of a number and one is equal to one added to the number. Emilio has completed high school and earned a bachelors degree in Anatomy and Physiology. He is attending medical school and is taking classes that focus on using imaging technology. He is also looking for a residency that will allow him to study X-rays. What career is Emilio most likely working toward?radiologyendourologyneurourologyurologic oncology if an object with a mass of 248kg is lifted 76 meters in 18 seconds, how much power is used? Which is true of American policy under Eisenhower and Dulles?A. The CIA played no role in policy.B. The two men liked to play dominoes.C. There was no conflict with the Soviet Union.D. The two men wanted to prevent Communism. Economics these two PLEASE 8. What are NAD+ and FAD? What do they become? Property rights are important to a free enterprise system because they:A. Allow businesses to freely take ideas from competing companies.B. Protect businesses' freedom to buy and sell products.C. Encourage businesses to keep prices as low as possibleD. Place regulations on businesses that make dangerous products. I WILL GIVE BRAINLIEST!!A(n) ______ essay explains an idea and gives supporting reasons.O trivial Oexpository Osummary Otedious What can an individual do to further public health? can someone please do this for me and tell me how so I can do the other one pleaseeee I don't know what to do A 3.8kw elective motor powers an inclined conveyer belt. It is designed to lift heavy boxes from the warehouse floor to loading bay. Answer the following: a)State the energy conversion performed by the motorb) Calculate the work done by the motor in 14 s c) If the conveyer belt takes 14 to lift its load vertically by 5.3m, calculate the maximum mass that can carried by the conveyer belt maximum mass that can be carried by the conveyer belt d) If a small box were to fall off the conveyer belt and hit the floor, calculate the speed at which it would hit the ground if falls from a vertical height of 4.7m Is the relation is a function, explain. {(8, 5), (7, 4), (6, 4), (5, 5)} which trends are reshaping the business, microeconomic and microeconomic environment and competitive arena? please answer my question What type of person can be a hero (50 - 60 words). Worth 30 points If you wanted to look up the meaning of the adjective guapas what would you have to look up in the dictionary?Please help me its due at 12:59 so im trying to figure out the slope of the line shown on the coordinate plane