instructions a milk carton can hold 3.78 liters of milk. each morning, a dairy farm ships cartons of milk to a local grocery store. the cost of producing one liter of milk is $0.38, and the profit of each carton of milk is $0.27. write a program that prompts the user to enter: the total amount of milk produced in the morning. the program then outputs: the number of milk cartons needed to hold milk. round your answer to the nearest integer. the cost of producing milk. the profit for producing milk.

Answers

Answer 1

If you want the user to enter a value, you use a prompt box. The user will have to either "OK" or "Cancel" in order to continue after a prompt box appears.

What exactly does a programming prompt mean?

A text-based operating system (OS) or program's command prompt is its input area. The question aims to compel a response. A short text string and a blinking cursor make up the command prompt, where the user writes commands.

According to the given information:

public static void main(String[] args) {

   Scanner scanner = new Scanner(System.in);

   System.out.println("Enter total amount of milk: ");

   double totalAmountOfMilk = Double.parseDouble(scanner.nextLine());

   System.out.println("The number of milk cartons needed to hold milk:");

   int numberOfMilkCartoons = (int) (totalAmountOfMilk / 3.78);

   System.out.println(numberOfMilkCartoons);

   System.out.println("The cost of producing one liter of milk:");

   double cost Of Producing One Liter Of Milk = totalAmountOfMilk * 0.38;

   System.out.println(costOfProducingOneLiterOfMilk);

   System.out.println("The output of the profit for producing milk:");

   double profitForProducingMilk = numberOfMilkCartoons * 0.27;

   System.out.println(profitForProducingMilk);

}

To know more command prompt visit:

https://brainly.com/question/2555135

#SPJ4


Related Questions

What type of security incident has occurred when classified data is introduced on an information system not approved for that level of information?

Answers

When classified data is introduced on a system that is not authorized to handle that level of information, a security event of the Spillage happen.

What kind of security event has taken place when classified material is added to an information system that isn't authorized for that degree of protection?

Data spills are the transfers of confidential or sensitive information (CUI) to an information system that is not allowed, not at the required security level, or not equipped with the necessary CUI protection.

The example of a security incident is which of the following?

Several instances of security incidents are systemic computer breach. misuse of systems, software, or data or unauthorized access to them. unauthorized alterations to software, systems, or data.

To know more about Spillage visit :-

https://brainly.com/question/30156504

#SPJ4

which of the following is not a valid statement? a. online analytical processing is a set of tools that work together to provide an advanced data analysis environment for retrieving, processing, and modeling data from the data warehouse. b. the data warehouse is a specialized database that stores data in a format optimized for decision support. c. production databases focus primarily on storing historical data and business metrics used exclusively for tactical or strategic decision making. d. a database that is designed primarily to support a company's day-to-day operations is classified as an operational database.

Answers

C. Production databases focus primarily on storing historical data and business metrics used exclusively for tactical or strategic decision making.

What is databases?

A database is a collection of information that is organized for easy access and manipulation. It typically contains data organized in a table, which is a two-dimensional structure with columns and rows. The columns represent the various elements of data, while the rows represent each individual record. Databases can be used to store and retrieve information quickly and securely. They are used in almost every industry and are essential for businesses to keep track of customer information, inventory, and more.

This statement is not valid because production databases are not used exclusively for tactical or strategic decision making. They are used to store the data that is used for day-to-day operations.

To learn more about databases
https://brainly.com/question/518894
#SPJ4

tenant sue wanted to install a grab bar in the bathroom to accommodate a handicap. which statement is false?

Answers

According to ADA regulations, grab bars must be installed on the side wall that is closest to the toilet (604.5). Someone who needs assistance sitting, standing, or getting from a wheelchair to the toilet seat can use this. The wall behind the toilet needs to have a grab bar as well.

What distinguishes a towel bar from a grab bar?

Grab bars are genuine safety products that are strong, long-lasting, and designed to support the weight of a falling adult in order to help prevent injury.

How can a person with a disability use a computer?

Another choice for people with disabilities is speech input.

To know more about speech input visit:-

brainly.com/question/22134491

#SPJ4

The Thunderbolt port allows for transmission of high definition video using the DisplayPort protocol.
- You can connect a monitor, a TV, or a device, like an external storage device, to your Mac via the Thunderbolt connector. Additionally, you may connect your Mac to a display that supports DisplayPort, Mini DisplayPort, HDMI, or VGA with the right adaptor.
- Some more recent Mac computers with Intel processors have a Thunderbolt 3 (USB-C) connection. Depending on the model, Mac laptops using Apple silicon have either a Thunderbolt USB 4 port or a Thunderbolt 4 (USB-C) port. Through the same cable, the ports enable data transfer, video output, and charging. See the Apple Support article Adapters for the Thunderbolt 4, Thunderbolt 3, or USB-C port on your Mac for details on which adapters are compatible with these ports.
- Multiple Thunderbolt devices can be powered simultaneously by a Mac's Thunderbolt connector, negating the need for separate power leads for every connected item. If your device requires more power than the Thunderbolt connector can supply, consult the documentation that came with it.

Answers

Absolutely, DisplayPort connections and devices work with Thunderbolt 3 ports.

Can DisplayPort be connected to a Thunderbolt port? Absolutely, DisplayPort connections and devices work with Thunderbolt 3 ports.8High quality video can be sent utilizing the DisplayPort protocol through the Thunderbolt connector.For connecting fast devices, ThunderboltTM ports offer tremendous bandwidth.Between the device and a PC, ThunderboltTM cables aid in ensuring a reliable connection.Adding external devices and docking stations to your PC is simple with ThunderboltTM accessories.In 2011, Intel and Apple together created Thunderbolt, a connector for computer peripherals.It unites many signal types into a single physical connection that can handle a variety of peripherals, including monitors, storage, docking, and input devices.

To learn more about Thunderbolt port refer

https://brainly.com/question/20693569

#SPJ4

A vending machine serves chips, fruit, nuts, juice, water, and coffee. The machine owner wants a daily report indicating what items sold that day. Given boolean values (1 or 0) indicating whether or not at least one of each item was sold, output a list for the owner. If all three snacks were sold, output "All snacks" instead of individual snacks. Likewise, output "All drinks" if appropriate. For coding simplicity, output a space after every item, even the last item. Ex: If the input is 0 0 1 1 1 0, output: Nuts Juice Water Ex: If the input is 1 1 1 0 0 1, output: All-snacks Coffee Ex: If the input is 1 1 1 1 1 1, output: All-snacks All-drinks Ex: If the input is 0 0 0 0 0 0, output: No items

Answers

Answer:

bool chipsSold, fruitSold, nutsSold; // Snack items

bool juiceSold, waterSold, coffeeSold; // Drink items

cin >> chipsSold;

cin >> fruitSold;

cin >> nutsSold;

cin >> juiceSold;

cin >> waterSold;

cin >> coffeeSold;

if(chipsSold == 1)

{

cout<<"Chips ";

}

else

{

return 0;

}

if(fruitSold == 1)

{

cout<<"Fruit ";

}

else

{

return 0;

}

if(nutsSold==1)

{

cout<<"Sold ";

}

else

{

return 0;

}

return 0;

}

a folder contains nencrypted files of which one is a special file. an attacker has access to the folder and withdraws kof these files one at a time. each selection is equally likely to be any one of the remaining files at the time. what is the probability that the intruder withdraws the special file?

Answers

The probability that the intruder withdraws the special file is 1/k.

What is the probability that the intruder withdraws the special file?The probability that the intruder withdraws the special file is dependent on the number of encrypted files in the folder and the number of files the intruder withdraws. If the folder contains n encrypted files and the intruder withdraws k of them one at a time, then the probability of the intruder withdrawing the special file is (1/n)^k. This means that the probability that the intruder withdraws the special file is increasing as the number of files in the folder decreases and the number of files the intruder withdraws increases.For example, if the folder contains 10 encrypted files and the intruder withdraws 5 of them one at a time, then the probability that the intruder withdraws the special file is (1/10)^5 or 0.0009765625. This means that the chances of the intruder withdrawing the special file are quite low, but not impossible.In general, the probability that the intruder withdraws the special file is inversely proportional to the number of encrypted files in the folder and proportional to the number of files the intruder withdraws. Therefore, the more files the intruder withdraws, the higher the probability that the special file will be withdrawn. Conversely, the more files that are in the folder, the lower the probability that the special file will be withdrawn.

To learn more about dividing probability refer to:

https://brainly.com/question/29844780

#SPJ4

miguel is performing a penetration test on his client's web-based application. which penetration test frameworks should miguel utilize?

Answers

Miguel should utilize a variety of penetration testing frameworks depending on the type of web-based application he is testing. Some popular frameworks for web application penetration testing include:

OWASP ZAP (Zed Attack Proxy).Burp Suite. Metasploit.Nessus.SQLMap.

A suite of tools for performing web application security testing, including a proxy server, spider, and scanner. An open-source web application security scanner that can be used to automatically find vulnerabilities in web applications. An open-source framework for developing and executing exploit code. It can be used to test web applications for vulnerabilities and to gain access to the underlying system.

Learn more about penetration test: https://brainly.com/question/29560410

#SPJ4

A software program that allows you to create professional-looking multimedia presentations.answer choicesMenu BarFontSlidePowerPoint

Answers

We can develop multimedia presentations with a professional appearance using the Powerpoint application.

Multimedia presentations: What are they?

A multimedia presentation is a form of communication in which we communicate messages using audio, video, artwork, drawings, and other different media. Additionally, Powerpoint assists in transforming dull presentations into captivating ones.

Why use Ms. Powerpoint?

There are a few straightforward and understandable tools in Ms. PowerPoint that allow for slide-based notes. make video and edit video, use Coral Draws to edit audio, etc. With the use of the tools offered by Powerpoint, we may design, sketch, film videos, and create banners.

To know more about Powerpoint visit:-

https://brainly.com/question/14498361

#SPJ4

mention four putput devices​

Answers

Answer:

Explanation:

these are list

in the context of a linux operating system, which command can be used to display the syntax and parameters for a specific command?

Answers

The kernel, system libraries, and system utilities make up the three fundamental components of a Linux system (LOVE, 2018). The kernel controls how hardware and application software communicate, as was already mentioned.

Which of these runs on the Linux OS?

Linux is a free and open-source operating system that is released in accordance with the GNU General Public License (GPL). Anyone may execute, analyze, alter, and redistribute the source code as long as they do it in line with the same license. Even copies of the modified code may be sold.

Which command will display the acceptable syntax and other command options?

The help command in the Command Prompt can be used to provide further information on another command. To find out more, At any moment, use the help command.

To know more about Linux operating system visit:-

https://brainly.com/question/29886037

#SPJ4

hackers often set up their own wireless access points in popular areas with the hope that users connect to them. these are known as:

Answers

A computer worm is a sort of virus that replicates itself and spreads to other computers while still functioning on infected ones. A computer worm multiplies in order to infect other systems.

Transaction processing systems (TPS) handle business transactions for the corporation, supporting overall enterprise operations. The most prevalent topology is by far stars. This system has a star-like form because each node is autonomously connected to a central hub by a physical wire. All information must pass through the central node in order to go to its final location. After the link was established, the malicious access point might have viewed every Internet request that his laptop issued. A worm is a self-replicating, self-propagating, self-contained software that spreads to other computers over networking protocols. Worms can propagate through software flaws, show up in phishing email attachments, or be accessed through malicious URLs.

To learn more about computer worm click the link below:

brainly.com/question/16893265

#SPJ4

you install windows on a new ssd that fits in an m.2 socket in a modern high-end motherboard. after installing the os, the system will not boot as expected. what could be the problem?

Answers

The CMOS, a memory chip that stores setting configurations and is powered by the onboard battery, is a real component of the motherboard. In the event that the battery dies, the CMOS is reset and all user settings are lost. The system clock is also reset when the CMOS loses power.

What is CMOS ?

There are several additional names for the complementary metal-oxide semiconductors that make up CMOS, including NVRAM (non-volatile RAM), RTC (real-time clock), and CMOS RAM.

A built-in, battery-operated semiconductor chip called CMOS acts as a data storage device in computers.

The hardware configurations of your machine and the system time and date are included in this data.

The image shows the Panasonic CR 2032 3V coin cell battery, which is the most common type used to power CMOS memory.

The Motorola 146818 chip, the first RTC and CMOS RAM component utilized in early IBM systems, could hold 64 bytes of information. As the system clock only used 14 bytes, the remaining 50 bytes of RAM could be used to store system settings.

Most of the computers in use today have settings built in.

Hence, The CMOS, a memory chip that stores setting configurations and is powered by the onboard battery, is a real component of the motherboard

learn more about CMOS click here:

https://brainly.com/question/14767803

#SPJ4

true or false? corrective controls are implemented to address a threat in place that does not have a straightforward risk-mitigating solution.

Answers

Answer:

True

Explanation:

Corrective controls are implemented to address a threat in place that does not have a straightforward risk-mitigating solution.

Describe five advantages of using sensors and microprocessors to monitor the temperature in a geyser rather than using manual methods

Answers

The  five advantages of using sensors and microprocessors to monitor the temperature in a geyser rather than using manual methods are:

AutomationReal-time dataRemote monitoringAlarm and notificationData collection and analysis

What are microprocessors?

Automation: Using sensors and microprocessors to monitor the temperature in a geyser eliminates the need for manual monitoring, which can be time-consuming and prone to human error.

Real-time data: Sensors and microprocessors can provide real-time data on the temperature of the geyser, allowing for more efficient and effective adjustments to be made to the system.

Remote monitoring: Sensors and microprocessors can be connected to a network or the internet, allowing for remote monitoring and control of the geyser temperature. This can be useful for monitoring the geyser from a different location, or to monitor multiple geysers at once.

Alarm and notification: Sensors and microprocessors can be programmed to send an alarm or notification when the temperature exceeds a certain threshold. This can help prevent overheating and damage to the geyser.

Lastly, Data collection and analysis: Sensors and microprocessors can collect and store data on the temperature of the geyser over time. This data can be analyzed to identify patterns and trends, which can be used to optimize the performance of the geyser and improve energy efficiency.

Learn more about microprocessors from

https://brainly.com/question/29243062

#SPJ1

after securing your space at the end of the day, you should try to badge back in to ensure it is locked.T or F

Answers

It is true that you should try to badge back in to make sure your area is closed after locking it up for the day.

Which re-evaluation is required on a periodic basis for a security clearance to remain in effect?

Individuals with security clearances are required to undergo periodic reinvestigations (PR) at least once every five years for Top Secret, once every ten years for Secret, and once every fifteen years for Confidential, depending on the level of access required.

Who provides an overseas trip security briefing for the defense?

The Office of Security/Information Security Division manages the Foreign Travel Briefing Program for the Department of Commerce (DOC). This program details the obligations for debriefing after international travel as well as the briefing and debriefing requirements.

To know more about badge back visit:-

https://brainly.com/question/29571159

#SPJ4

11) Email clients, FTP clients, and web browsers are different ways of accessing information on the web.

True

False

Answers

Answer: tech- this is true but..

Explanation:

email clients are a way to send information but it has to access information before it sends information

ftp clients are the same

and the web is, well you know the world wide web the biggest library for information.

hope it helps

last final anwser is Yes Its True

what hardware and/or operating system support do you think would be needed to protect an application's data structures in memory from being corrupted by other applications?

Answers

It is needed to do fault isolation requires a guard. app memory is guarded by hardware, disk is guarded by the operating system kernel, while spam is harder to prevent. The correct option is C.

What is corrupted memory?

Memory corruption, also known as a violation of memory safety, happens when the contents of a memory location are changed as a result of programmed action that deviates from the original programmer's purpose or from program/language constructs.

A guard is necessary to perform fault isolation. Hardware protects app memory, the operating system kernel protects the disc, but spam is more difficult to stop.

Thus, the correct option is C.

For more details regarding memory corruption, visit:

https://brainly.com/question/2944613

#SPJ1

- Protect an application's data structures in memory from being corrupted by other apps

-Protecting one user's disk files from being accessed or corrupted by another user

-Protecting the network from a virus trying to use your computer to send spam

question based on the algorithm represented in the flowchart, what value is displayed if j has the initial value 3 and k has the initial value 4 ?

Answers

The practice of deploying bots to gather information and material from a website is known as web scraping.

Web scraping collects the underlying HTML code and, with it, data kept in a database, in contrast to screen scraping, which just scrapes pixels seen onscreen. After that, the scraper can duplicate a whole website's content elsewhere. Data science and machine learning both now heavily rely on web scraping. It's a talent that is continuously developing and getting better because it's how we use data from the internet to access, collect, and apply it in our algorithms and models. The practice of deploying bots to gather information and material from a website is known as web scraping.

Learn more about information here-

https://brainly.com/question/15709585

#SPJ4

which type of malware is a fully contained program that self-replicates and spreads through networks?

Answers

A PC worm is a sort of malware whose essential capability is to taint different PCs while staying dynamic on contaminated frameworks. A PC worm copies itself to spread to uninfected PCs.

Is a sort of malware that is connected to a host record and can reproduce?

Worms. Like an infection, a worm can likewise self-reproduce and spread full duplicates and sections of itself by means of organization associations, email connections, and texts. Dissimilar to infections, nonetheless, a worm doesn't need a host program to run, self-recreate, and spread.

What is a sort of malware which is intended to report action on your PC to another party?

Spyware is a particular sort of malware that is intended to gather data about the client or their PC clandestinely. Perhaps of the most widely recognized way spyware is introduced on a PC is through tainted email connections or by tapping on noxious connections.

To know more about frameworks visit :-

https://brainly.com/question/13262553

#SPJ4

where should ozone be located to help protect from ultraviolet radiation from the sun? in the exosphere in the troposphere below the troposphere in the stratosphere

Answers

The ozone layer, which is extremely important, is found in the stratosphere. The ozone layer shields us from the sun's ultraviolet radiation (UV).

What is radiation?

Radiation is energy that travels through space at the speed of light from a source. This energy is associated with an electric and magnetic field, and it has wave-like properties. Radiation is also known as electromagnetic waves. Radiation is a mutagen that can eventually cause cancer. Radiation can either kill cells or damage their DNA, impairing their ability to reproduce and eventually leading to cancer. High energy particles pass through your body when radiation is present.

Here,

The stratosphere contains the critically important ozone layer. The ozone layer protects us from ultraviolet radiation from the sun (UV).

To know more about radiation,

https://brainly.com/question/25597737

#SPJ4

question 8 why is it risky if you wanted to make an exception to the application policy to allow file sharing software?

Answers

It is risky if you wanted to make an exception to the application policy to allow file-sharing software because the software could be infected with malware.

What is the application policy?

It's crucial to set up some sort of application policy. These regulations have two objectives.

They not only outline restrictions on which apps are allowed or not, but they also assist in educating users on safer software usage.

Therefore, making an exemption to the application policy to permit file-sharing software is dangerous because the software may be malware-infected.

To learn more about the application policy, refer to the link:

https://brainly.com/question/28528067

#SPJ1

Write an expression that prints "Special number" if specialNum is -99, 0, or 44. c++

Answers

Answer:

if (specialNum == -99 || specialNum == 0 || specialNum == 44) {

   std::cout << "Special number";

}

Explanation:

which components of the microservices arch are compliant to activities when implemented in the spring boot application

Answers

The routing, response formats, and even the system cache are handled by the API gateway. By utilizing API gateway, internal microservices can use several communication protocols.

The service mesh develops a dynamic communications layer in a microservices architecture to streamline communication. Developers don't have to write in inter-process communication when they construct the program because it abstracts the communication layer. The "new normal" is microservice architectures. Small, standalone programs that are ready to launch can give your code more flexibility and durability. The numerous purpose-built capabilities of Spring Boot make it simple to design and manage your microservices in scaled-up production.

Learn more about communication here-

https://brainly.com/question/14809617

#SPJ4

6) Mosiac, Netscape, Firefox, and Chrome are:

A) URLs.

B) protocols.

C) packet switchers.

D) web browsers.

Answers

Answer:

D) Web Browsers

Explanation:

NCSA's one of the first widely used web browsers was Mosaic, which has since been abandoned. By incorporating multimedia elements like text and graphics, it helped the World Wide Web and the Internet as a whole become more widely used. It was given that name because it supported a variety of Internet protocols, including Gopher, File Transfer Protocol, Network News Transfer Protocol, and Hypertext Transfer Protocol. Its user-friendly interface, dependability, compatibility with personal computers, and ease of installation all contributed to its appeal on the internet. The first browser to display graphics alongside text rather than in a separate window is Mosaic. It was preceded by WorldWideWeb, the less well-known Erwise, and ViolaWWW, but it is frequently referred to be the first graphical web browser.

The American independent computer services firm Netscape Communications Corporation, formerly known as Mosaic Communications Corporation, has offices in Mountain View, California, and Dulles, Virginia. Its Netscape web browser was once in charge, but it lost the 'first browser war' to Internet Explorer and other rivals, and its market share dropped from over 90% in the mid-1990s to less than 1% in 2006. JavaScript, the most popular language for client-side scripting of web pages, was developed by early Netscape employee Brendan Eich. HTTP cookies were developed by Netscape founding engineer Lou Montulli. Before TLS gained over, the business also created SSL, a protocol for safeguarding web interactions.

The Mozilla Foundation and its subsidiary, the Mozilla Corporation, created the free and open-source web browser known as Mozilla Firefox, or just Firefox. It displays web pages using the Gecko rendering engine, which incorporates up-to-date and future web standards. Under the code name "Quantum," Firefox started implementing new technology in November 2017 to encourage parallelism and a more user-friendly UI.

to know more about web browsers, see

https://brainly.com/question/22650550

short infrared wavelengths are used in what technology_____

Answers

Infrared light waves, which are barely beyond the visible light spectrum, are used by a remote control to change the channel on your TV.

The required details for  short-wave infrared in given paragraph

What is the purpose of short-wave infrared?

A sophisticated method for creating images based on radiation in the portion of the electromagnetic spectrum that is invisible to the human eye is called short-wave infrared imaging (SWIR).

How is infrared used in technology?

Heat sensors, thermal imaging, and night vision gear are some of the most well-known types. Infrared light is employed in wired and wireless activities in communications and networking.

To know more about light visit:-

brainly.com/question/29994598

#SPJ4

] assuming there is a growth function f(n), what does the value of f(0) represent in terms of an algorithm?

Answers

Assuming a growth function f(n) exists, f(0) denotes the growth function's starting point (n). To put it another way, f(0) stands for the general cost of running the algorithm on an empty input.

What is a growth function in data structures?

Growth functions are used to predict how many steps an algorithm will take as its input increases. The order of growth of an algorithm provides a rough estimate of the amount of time needed to run a computer program as the quantity of the input rises.

The sequence of growth ignores the constant factor required for fixed processes in favor of the operations whose output size grows proportionately. Exponential algorithms are only effective for minor issues since exponential functions expand rapidly.

To learn more about computer program, visit:

https://brainly.com/question/28874085

#SPJ4

What was the first model of the Remington typewriter to include the visible "upstrike" design?Question 2 options:Remington 1 Remington 2 Remington 3 Remington 10

Answers

The first model of the Remington typewriter to include the visible "upstrike" design was the B. Remington 2

What is a Typewriter?

This refers to the term that is used to describe and define the use of a machine that types out words and numbers on a piece of paper and is a primitive printer.

Hence, it can be seen that the Remington No. 2, which was originally sold in 1878, was the first typewriter to achieve commercial success. You must raise the platen to see the lettering since the type-bars strike it from below. It is also known as an upstrike machine or a blind writer.

Read more about typewriters here:

https://brainly.com/question/485590

#SPJ1

what is a data dictionary useful for? it is a tool for transforming data into a relational database.

Answers

A data dictionary is used to organize and explain the organization and substance of data, and it offers descriptive headings for specifically defined data objects.

What is a database's data dictionary?

In a database, information system, or as a component of a research effort, data components are used or recorded. A data dictionary is a collection of names, definitions, and properties regarding those data elements.

Tools for a data dictionary are what?

The tools used to retrieve data from any repository and access the information stored there are known as data dictionary tools. The term "data dictionary" refers to a certain kind of dictionary that gathers all the information about data, including its meaning, relationships, structure, and uses.

To know more about data dictionary visit :-

https://brainly.com/question/8897251

#SPJ4

define a function named sortvector that takes a vector of integers as a parameter. function sortvector() modifies the vector parameter by sorting the elements in descending order (highest to lowest). then write a main program that reads a list of integers from input, stores the integers in a vector, calls sortvector(), and outputs the sorted vector. the first input integer indicates how many numbers are in the list. ex: if the input is: 5 10 4 39 12 2 the output is: 39,12,10,4,2,

Answers

An illustration of functions, loops, and vectors or lists is a type of vector program. To better analyze data, sorting is the process of arranging it in meaningful order.

How can a sorting program be written?

A method for rearranging a large number of items in a predetermined order, such as alphabetically, highest to lowest value, or shortest to longest distance, is called a sorting algorithm. Sorting algorithms take lists of items as their input, carry out particular operations on those lists, and then return ordered arrays as their output.

The program  :

#include <iostream>

#include <vector>

#include <algorithm>

template<typename tip>

auto Compare(std::vector<tip>&a, std::vector<tip>&b) {

auto sum_a = 0, sum_b = 0;

for (int i = 0; i < a.size(); i++)

  sum_a += a[i];

for (int i = 0; i < b.size(); i++)

  sum_b += b[i];

return sum_a > sum_b;

}

template <typename tip>

void sort_sum_of_rows(std::vector<std::vector<tip>> &mat) {

std::sort(mat.begin(), mat.end(), Compare);

}

int main() {

std::vector<std::vector<int>> a{{2, 5, 1, 3, 4},

  {9, 8, 9},

  {3, 3, 2, 3},

 {4, 5, 2, 1, 1, 3, 2}};

sort_sum_of_rows(a);

for (auto &v : a) {

  for (int j : v)

    std::cout << j << " ";

  std::cout << std::endl;

}

return 0;

}

Learn more about sort vector function :

brainly.com/question/23671682

#SPJ4

after securing your space at the end of the day, you should try to badge back in to ensure it is locked. T/F

Answers

After securing your space you should attempt to badge back in after locking up your space for the day to make sure it is locked. The given statement is True.

What is the Security?

Security is resistance to potential harm (or other unwelcome coercive) brought about by others by restricting their ability to act. Beneficiaries of security can include individuals and social groups, things and institutions, ecosystems, and any other thing or phenomenon that is susceptible to unwelcome change. Refugees arrive on Lesbos Island in 2015 after fleeing conflict and instability in Iraq and Syria. Although security is most often associated with defense against hostile forces, it also has a broad variety of other meanings, such as the absence of damage (such as freedom from want); the presence of an important item.

(for instance, food security), as resistance to possible harm (for instance, secure foundations), as confidentiality (for instance, a secure telephone connection), as containment (for instance, a secure chamber or jail), and as a state of mind (e.g. emotional security).

To know more about Security visit now

https://brainly.com/question/13013841

#SPJ4

Other Questions
Prove that circle A with center (1, 1) and radius 4 is similar to circle B with center (4, 2) and radius 3 Find the missing coordinate of P, using the fact that P lies on the unit circle in the given quadrant.Coordinates QuadrantP( , -5/7) IV item9 item 9 a company purchased $120,000 of 6% bonds on may 1 at par value. the bonds pay interest on march 1 and september 1. the amount of interest accrued on december 31 (the company's year-end) would be: Which number is less than 5/8 but greater than 1/9? To analyze an author's style, which elements should the reader identify? Check all that applyDaudienceOplotOpoint of viewtoneword choice according to darwin, organisms that are best adapted to their environment are more likely to produce offspring than organisms that are less well adapted to their environment. which phrase is used to summarize this idea? Linda and Chris are purchasing their first home. Which of the following charges will appear as a debit to them on the settlement statement? which of the following phrases does not describe an essential characteristic of a factory? a. produces a standardized product to be sold in a wide market b. relies on stocks and bonds in order to finance plants and machinery c. assemble workers under a definite organizational discipline d. carries out complex operations in one building or in adjacent buildings You spent $250 on your credit card. It has been 5 years and you have a 3.75% interest rate. How much interest do you owe? A 65.2 kg base runner begins his slide into second base while moving at a speed of 4.93 m/s. He slides so that his speed is zero just as he reaches the base. The acceleration of gravity is 9.8 m/s. What is the magnitude of the mechanical energy lost due to friction acting on the run- ner? Answer in units of J. A car drives 40 miles at an angle of 35 degrees north of east then drives for 50 miles due north and finally 10 miles at an angle of 20 degrees north of west what is the cars resultant magnitude and direction Through which capital cities would a person pass if they traveled directly from Astana to Afghanistan? hackers often set up their own wireless access points in popular areas with the hope that users connect to them. these are known as: OPEC helps to make decisions about the price and production of __________.A.coalB.copperC.diamondsD.oil A 5. 5kg bowling ball initially at rest is dropped from the top of a 12 m building. It hits the ground 1. 75s later. Find the net external force on the falling ball? What is a psychological perspective that uses concepts such as adaptation, reproduction, and natural selection as the basis for explaining specific human behaviors?a. Socioculture approachb. Neuroscience approachc. Evolutionary approachd. Behavioral approach why use the sum function with a range of cells when adding the values together accomplishes the same thing? If a person had mutation which caused a shape and function change of DNA polymerase so that it had decreased repair activity, which of the following would y expect to happen? More: A. mutations B. free radicals C. gene expression D. replication Explain the sources of instrumental errors Alzheimer's disease is a degenerative brain disorder that affects more than 4 millionAmericans. Neuroscientists have many theories about the causes of Alzheimer's and aresearching for clues as to causes of the neuronal destruction of the brain in this disease.Which of the following factors would not contribute to a loss of brain function?A. strokeB. agingC. head traumaD. arthritisE. clogged arteries