Create a program that allows the user to insert 30 integer numbers. The program should return the average of the positive numbers inserted  that are multiples of 3 (the average should be a floating point number). If during the insertion the user enters a number x that is a divisor of 70 the total count of integers inserted should be decreased by x units.
E.g. the user may enter 31, 6, 10, 7, 19, 96, 5, 12 and then it should stop asking for numbers, because the total number of integers inserted is 8, but since 10, 7 and 5 were inserted, which are all divisors of 70, no more integers had to be asked for, since 8 + 10 + 7 + 5 = 30.
The program should return 38, since that is the average of 6, 96 and 12
In c++

Answers

Answer 1

A program that allows the user to insert 30 integer numbers. The program should return the average of the positive numbers inserted  that are multiples of 3 is given below:

The Program

#include <iostream>

using namespace std;

int main()

{

   int n, i;

   float num[100], sum=0.0, average;

   cout << "Enter the numbers of data: ";

   cin >> n;

   while (n > 100 || n <= 0)

   {

       cout << "Error! number should in range of (1 to 100)." << endl;

       cout << "Enter the number again: ";

       cin >> n;

   }

   for(i = 0; i < n; ++i)

   {

       cout << i + 1 << ". Enter number: ";

       cin >> num[i];

       sum += num[i];

   }

   average = sum / n;

  cout << "Average = " << average;

   return 0;

}

Output

Enter the numbers of data: 6

1. Enter number: 45.3

2. Enter number: 67.5

3. Enter number: -45.6

4. Enter number: 20.34

5. Enter number: 33

6. Enter number: 45.6

Average = 27.69

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1


Related Questions

what do we call, computing devices capable of being inserted or removed from a computer system that is running , without causing damage or affecting performance ?​

Answers

Answer:

Where I work we call those hot-swappable or devices capable of "concurrent maintenance."

Explanation:

Which were the top two forces operating in the case of recreational equipment inc (rei)?

Answers

In the matter of REI, the company is organized as a consumer and Business design and development. REI operates better than 125 retail shops in 32 states.

What is REI known for?Recreational Equipment Incorporated is known as REI.REI, also referred to as Recreational Equipment, Inc., is an American firm that provides services for outdoor recreation and retail. It is set up as a cooperative for consumers. REI offers clothing for men, women, and children as well as equipment for camping, hiking, climbing, biking, water sports, staying fit, skiing, and travel. Customers of the retailer are environmentally concerned, and they also adopt lifestyle practices that are kind to the environment. They reuse shopping bags and recycle. The answer to each of these queries could be influenced by the organizational structure of the business: Since REI is a retail cooperative, its members own it.

To learn more about REI, refer to:

https://brainly.com/question/16954546

#SPJ4

If program a writes to bookkeeping.txt the same time that program b reads from bookkeeping.txt, what can potentially go wrong?

Answers

The biggest potential to go wrong is that Program B may be reading only partial data.  The reason for this is that program B might overlook a recent file update made by program A. A database can control reading and writing to shared data to prevent issues of this nature.

Data management is the process of gathering, storing, and utilising data in a cost-effective, efficient, and secure manner. In order to make judgments and conduct activities that will benefit the business as much as possible, data management aims to assist individuals, organizations, and linked things in optimizing the use of data within the constraints of policy and regulation.

Learn more about data management https://brainly.com/question/24267807

#SPJ4

What information in a transmitted message might an ids use to identify network threats?

Answers

A message's transmitted data may contain network dangers, which a signature by IDS can identify.

Message transmission is one of the most important methods of communication, but it can also be one of the most dangerous. Network threats can come in many forms, and one of the most common is known as a "signature."

Signatures are simply patterns of data that can be used to identify a specific message or group of messages. IDS, or Intrusion Detection Systems, are designed to detect these signatures and flag them as potential threats.

While IDS can be incredibly useful, they can also be fooled. Hackers and other malicious actors are constantly coming up with new ways to disguise their signatures, so IDS systems have to be constantly updated in order to be effective.

That said, IDS is still one of the best tools we have for detecting network threats. So if you're transmitting sensitive information, be sure to use an IDS-protected system.

Learn more on IDS here:

https://brainly.com/question/14284690

#SPJ4

A feature in windows 10 that is used to organize open windows into task-specific groups is called?

Answers

A feature in windows 10 that is used to organize open windows into task-specific groups is called virtual desktop.

Virtual desktop is a windows 10 feature that allows to keep productivity up and stay organized in a single screen. It enables the employees of any organization to separate their business environment from their personal environment as this cloud-based desktop helps to separate the work data from the local hardware by running them on another server instead of the device itself. This helps to keep the confidential information safe without the need for another working device thus enabling a person to use a single device for both work and personal matters without any problem. It helps to virtualize both desktop and applications. This allows the user to log in to a virtual desktop on any device at any time without the need to carry their laptops everywhere.

To learn more about virtual desktops, click here:

https://brainly.com/question/27960885

#SPJ4

What is a website that encourages members in its online community to share their interests, ideas, stories, photos, music, and videos with other registered users?

Answers

A website called Online Social Network enables its users to share their interests, opinions, and content with other members of the site's community, including photographs, music, videos, and photos.

Social media are interactive technologies that make it easier to create and share content across virtual communities and networks, including information, ideas, interests, and other kinds of expression. In relation to media, the term "social" implies that platforms are user-centric and encourage social interaction.

Social media can be viewed as an online facilitator or enhancer of human networks, or groups of individuals who are better able to connect with one another. Users frequently download services that provide social media capabilities to their mobile devices or use web-based apps on their computers to access social media services.

Learn more about social media https://brainly.com/question/18958181?

#SPJ4

A key attribute of network organizational design is a shift from ___________ to ___________.

Answers

A key feature of network corporate strategy is a change from function to process.

What are the network strategies?A network strategy is your plan for creating and managing a network of partners in the most effective way possible to achieve your common objectives. It focuses on how you'll create your network and what you'll do and won't do to make sure your efforts are in line with your objectives. Draw the four network strategy models shown here: distributed processing network, peer-to-peer, client/server, and terminal. Your professional development will be boosted by personal networks, operational networks assist you in managing current internal responsibilities, and strategic networks help you focus on future business opportunities and the stakeholders you need to engage to explore those opportunities.

To learn more about network strategy, refer to:

https://brainly.com/question/23763254

#SPJ4

The ____ is used to store the highest location in memory accessible by each program.

Answers

Answer: Bounds Register

Explanation: -

Answer: Bounds Register

Explanation:

What does a pointer in a data node hold? A. It holds the length of the collection. B. It holds the data type of the variable C. It holds the address of the next node to form a link. D. It holds the value of the element.​

Answers

A pointer in a data node holds the address of the next node to form a link.

What is a Pointer?

Pointers are variables that are used to keep track of where a value is located in memory. A memory address is stored as a pointer to a location. Dereferencing is the action of retrieving the value kept at a location that a pointer is referencing.

It works just like a textbook index, where each page is identified by its index page number. Using the location mentioned above, one may quickly locate the page. The use of pointers in this way facilitates the dynamic implementation of a number of data structures, including stack and list.

There are many types of Pointer, some of them are :

Null PointerVoid PointerWild PointerDangling PointerFunction Pointer

Hence, the pointer in a data node hods the address of the next node to form a link.

To learn more about Pointers :

https://brainly.com/question/19570024

#SPJ1

____ is a measure of the degree to which each software and hardware component relies on other modules to perform its function.

Answers

Coupling is the measure of the degree that describes the dependence of each software and hardware component on other modules in order to perform their functions.

Coupling measures the extent of interdependence between different hardware, software and other modules.  Low coupling means modules are not dependent on each other to that much. On the contrary, modules that are strongly dependent on each other have tight coupling and depend completely on each other to perform their functions.  

It is considered a best practice to achieve low coupling that reduces interdependence between hardware, software and other modules.

Different modules may depend on each other for the following reasons:

To access data For passing control flow  To share resource between modules For data synchronization Having common file/folder Using same switch/router Using same protocols

You can learn more about coupling at

https://brainly.in/question/42247892

#SPJ4

Fill in the Blank
A band is recording a new song. The sound wave is analog data.
To convert it to digital data, a _____ rate of 44.1 kHz is used.

Answers

To convert it to digital data, a bit rate of 44.1 kHz is used. Hope this helps :)

What text editor can be used on linux to view and edit the contents of a configuration file?

Answers

Answer: Vim editor can be used on Linux

10 identical copies of a movie will be stored on 40 computers such that each computer has at most 1 copy. how many different ways can the 10 copies be stored? group of answer choices

Answers

10 identical copies of a movie will be stored on 40 computers such that each computer has at most 1 copy that will be (40 10).

An unofficial replication or imitation. a collection of genetically identical cells or creatures produced through some form of asexual reproduction from a single cell or individual.

Twins that are identical to one another but different from their parents share the same DNA. But a clone only has one parent and shares that parent's DNA perfectly.

Making numerous, exact copies of a specific segment of DNA is known as DNA cloning. The gene or other DNA fragment of interest (perhaps a gene for a therapeutically significant human protein) is first put into a circular piece of DNA called a plasmid in a DNA cloning method.

Learn more about identical copies:

https://brainly.com/question/13411887

#SPJ4

Explain why the mean should not be found for a sample of zip codes. which measure of center should be used instead?

Answers

Zip codes are qualitative data even though they contain numeric information because they don't count or measure anything. Since adding zip codes would be pointless, the mean cannot be determined.

The mode is the only central metric that can be found for qualitative data. Qualitative information describes traits or attributes. It is obtained by observation, interviews, or surveys and frequently takes the form of stories. For instance, it might be the answers to an open-ended survey or notes from a focus group on the caliber of the food at Cafe Mac.

Qualitative data may be challenging to measure and evaluate with accuracy. The information could take the form of descriptive words that can be coded or otherwise analyzed for patterns or significance.

Learn more about qualitative https://brainly.com/question/14126031?

#SPJ4

What type of character can also be referred to as an avatar, main, or alt

Answers

The type of character that can also be referred to as an avatar, main, or alt is known to be called alternate character.

What are the characters in role-playing games?

In regards to the different characters in role-playing games, an alternate character is known to be a kind of a character that is often known to be called a form of an in slang such as alt, alt char, or multi.

This is known to be a kind of character that is said to be added to a person's "primary" or "key" player character.

In any form or type of gaming, "ALT" is a term that is known to be used as a form of second ID for a given player.

Therefore, based on the above, The type of character that can also be referred to as an avatar, main, or alt is known to be called alternate character.

Learn more about character from

https://brainly.com/question/8864308

#SPJ1

Operating systems move code and data, as necessary, to a portion of the disk that is used as if it were memory, not just disk storage space. this disk location is called ____ _______.

Answers

Answer:

Virtual memory

Explanation:

Acts as both memory and disk storage space.

Virtual memory frees up RAM by transferring data that hasn't recently been used to a storage device, such as a hard disk or solid-state drive (SSD). Virtual memory is useful for multitasking, running large programs, and speeding up the system.

What is the role of virtual memory in disk storage space?

Virtual memory fulfills two functions. First, by using disk, it enables us to increase the utilization of physical memory. Because each virtual address is converted to a physical address, it also enables memory protection.

An operating system may load programs larger than its physical memory thanks to virtual memory, which is its fundamental benefit. The users get the idea that the machine has boundless memory. Additionally, it offers memory security.

Therefore, operating systems move code and data, as necessary, to a portion of the disk that is used as if it were memory, not just disk storage space.

Learn more about virtual memory here:

https://brainly.com/question/13384907

#SPJ2

How would you describe the dns name space is partitioned?
a. case sensitive
b. randomly
c. hierarchical
d. sequentia

Answers

The DNS name space is partitioned hierarchical

DNS is the Domain Name System, and it is responsible for translating human-readable domain names (like www.example.com) into IP addresses (like 192.0.2.1).

The DNS name space is organized in a hierarchical manner, with different levels of the hierarchy corresponding to different domains. For example, at the top level there is the .com domain, which contains all the .com domains, and beneath that there is the example.com domain, which contains the www.example.com domain.

The hierarchical nature of DNS makes it easy to partition the name space into different domains, which can be managed by different organizations. This makes it possible to delegate authority over different parts of the DNS name space.

The DNS name space is a critical part of the Internet, and it is important that it is managed in a responsible manner. The DNS name space is a public resource, and it should be used in a way that benefits the public as a whole.

Learn more on Domain Name System here:

https://brainly.com/question/24677817

#SPJ4

Describing How to Insert a Picture in a Document
What are the correct steps for inserting a picture into a Word 2016 document?
Click Insert.
Click Pictures.
Select a picture file.
Click the Insert tab.
Place the cursor at the
insert point.
Helllpppp

Answers

Answer:

Explanation:

Right answer

5) Which of the following software application software? a) Microsoft Word b) Window 8 c) Window XP d) none of the above​

Answers

Answer: Microsoft word is a software application

Which of the following is not an operating system

Answers

Answer.Firat know about operating system. the system that can operate is called operating system

A table can help_________________

Answers

Explanation:

Table can help what please

True or false? the right-most part of an ip address is used to identify the network that a device belongs to.

Answers

The right-most part of an IP address is used to identify the network that a device belongs to is a false statement.

What is an IP address?

An IP address is known to be a term that connote a special form of an address that helps to tell or identifies a device on the internet or any kind of local network.

Norte that the IP stands for "Internet Protocol," which is the group of rules ruling  the format of data sent through the use of the internet or local network.

Therefore, The right-most part of an IP address is used to identify the network that a device belongs to is a false statement.

Learn more about IP address  from

https://brainly.com/question/14219853

#SPJ1

A security self-assessment revealed that penelope, who owns one laptop computer, is putting herself at risk for cyberattack by _____.

Answers

A security self-assessment revealed that penelope, who owns one laptop computer, is putting herself at risk for cyberattack by backing up critical files to a single folder on her laptop.

She is placing herself at risk for a cyberattack by regularly backing up important files to a single folder on her laptop.

Cyber attacks are assaults carried out by internet criminals using one or more computers to target one or more computers or networks. A cyber attack has the potential to steal data, deliberately disable machines, or utilize a compromised computer as a launching pad for more attacks. Malware, phishing, ransomware, and denial of service are just a few of the techniques used by cybercriminals to begin a cyberattack.

Learn more about cyberattack https://brainly.com/question/27726629

#SPJ4

More than 80% of all computer viruses are caused by macro viruses. What programs are most likely affected by a macro virus?.

Answers

The programs most likely affected by a macro virus are Microsoft word and Microsoft excel.

Macro viruses are a type of computer virus written in the same macro language as software programs, such as Microsoft word and Microsoft excel. They are more targeted and difficult to detect than other more general and common types of computer viruses because they are specifically designed to infect the user's documents.

Macro viruses run within applications and are often spread through phishing emails.

Once the macro virus spreads in a computer, it has the capability to corrupt the data or information and can also delete any of the contents of the storage devices. This type of virus can also alter Microsoft excel or word files or generate new files without the user's knowledge about it.

To learn more about the macro virus, click here:

https://brainly.com/question/9852117

#SPJ4

How many student objects are created by the following statements? student[] students = new student[20]; for (int i = 0; i < 5; i ) { students[i] = new student(); }

Answers

The following commands, which add up to 20, generate student objects: student[] students = new student[20]; for (int I = 0; I 5; I students[i] = new student();

What is computer programming?Computer programming is the process of carrying out a certain computation through the design and creation of an executable computer program. Programming tasks include analysis, algorithm creation, resource consumption profiling, and algorithm implementation. Computer programming is the process of creating instructions and coding to enable certain tasks in a computer, application, or software program. One must program a computer in a language that the machine can understand in order to get it to perform certain tasks. By interacting with machines through computer programming, we can get them to do the things we ask of them.

To learn more computer programming, refer to:

https://brainly.com/question/23275071

#SPJ4

Largest implementation of client/server computing and linking of thousands of individual networks is:______.
a. edge computing
b. the internet
c. grid computing

Answers

The largest performance of client/waitperson computing and linking of thousands of personal networks is edge computing

What does the term "edge computing" mean?A variety of networks and devices that are at or close to the user are referred to as edge computing, an emerging computing paradigm. Edge is about processing data more quickly and in larger volume near the point of generation, providing action-driven solutions in real-time. A distributed computing paradigm called "edge computing" brings computation and data storage closer to the data sources. This should reduce bandwidth usage and speed up response times. It is not a certain technology, but an architecture. It is a kind of spread computing that is topology- and location-sensitive. The gadget on your wrist and the computers analyzing intersection traffic flow are just two examples of how edge computing is already in use all around us.

To learn more about edge computing, refer to:

https://brainly.com/question/23858023

#SPJ4

At the command prompt, type file /bin/nice and press enter. what type of file is it? should you use a text tool command on this file?

Answers

At the command prompt, if you type file /bin/nice and press enter, the type of file is it is /etc/inittab is a ASCII text.

A person can to use a text tool command on this file.

What type of file is etc inittab?

There are different kinds of programming files. The /etc/inittab file is known to be a kind of a configuration file that is said to be used by the System V (SysV) initialization system in  regards to Linux.

Note that this is a kind of file that tells about three items for the init process.

Therefore, Based on the above, At the command prompt, if you type file /bin/nice and press enter, the type of file is it is /etc/inittab is a ASCII text. A person can to use a text tool command on this file.

Learn more about ASCII text from

https://brainly.com/question/15058196

#SPJ1

When unlisted service or procedure codes are reported, a _____ is also required.

Answers

When unlisted service or procedure codes are reported, a Special Report is also required. This is part of surgery condition.

A person may undergo surgery to investigate or cure a pathological condition, such as an illness or injury, to help improve physical function or appearance, or to mend unwelcome ruptured portions. Surgery is a medical speciality.

A surgical procedure, an operation, or simply "surgery" can be used to describe the process of doing surgery. The word "operate" here refers to performing surgery. The adjective surgical means pertaining to surgery. A person or an animal may be the object or subject on which surgery is conducted.

Learn more about surgery https://brainly.com/question/10479664

#SPJ4

True or false: in a problem function, y = f (x), there is usually more than one outcome (y) and only one input (x).

Answers

The given statement in the question is false in that to solve any problem, the function, y = f(x) does not produce more than one outcome (y) on only one value of input (x). Rather it is as on more than one input (x), there is only one outcome (y).

To solve a problem using the Six Sigma approach, the function y= f(x) plays a vital part. In the function y= f(x), x denotes the input variables in the problem. The input variables are independent variables and these could include manpower, machine, and material etc. Whereas, y describes outcome variables from the problem. The outcome variables are dependent variables and may include productivity, throughput, quality and cycle time etc.

As x is input, it produces outcome y. It is possible that there are more than one values of input (x) which drives the only one value of outcome (y).  

You can learn more about Six Sigma function y= f(x) at

https://brainly.com/question/5028853

#SPJ4

Which of the following best describes the margins of a Word document?
the area where document properties appear
the area to the right of a document where comments appear-
the area at the top or bottom of a document where page numbers appear
the area along the top, bottom, left, and right edges of a document where no text appears… please hurry…

Answers

The option that best describes the margins of a Word document is option d: the area along the top, bottom, left, and right edges of a document where no text appears.

What are margins in Word?

Margins are known to be called the blank spaces that can be said to be a line found at the top, bottom, as well as left and right sides of a any given document.

Note that they are said to be very important due to the fact that they help make a document to look very  neat as well as look  professional.

Note that for one to be able to  change margins, a person need to click on the Margins button, that is known to be found on the Page Layout tab.

Therefore, The option that best describes the margins of a Word document is option d: the area along the top, bottom, left, and right edges of a document where no text appears.

Learn more about Page margin  from

https://brainly.com/question/3164460

#SPJ1

Other Questions
More than 80% of all computer viruses are caused by macro viruses. What programs are most likely affected by a macro virus?. Ali bought three pieces of fruit with the following weights, 8.712 grams, 14.125 grams, and 21.926 grams. What is the best estimate for the total weight of the fruit? There are three bowling balls. The balls average 14 pounds. The first ball weighs 12 pounds. The second ball weighs 15 pounds. How much does the third ball weigh?Enter your answer in the box as a whole number. Will give brainlyist Please Help Me With This Problem: Which details from the passage describe Thomas Jefferson? Check all that apply. -He said that slavery was a problem. -He joined the abolitionist movement. -He supported the idea of equal rights. -He owned hundreds of enslaved people. -He operated a business in the slave trade What is the primary purpose for conducting a comprehensive developmental evaluation for an elementary student who has a learning disability? How did Industrial Working conditions contribute to the growth of the Labor Movement? What is the equation of the line that passes through the point (6, 1) and has a slopeof-5/6 A flowerpot falls from a window sill 36.5 mabove the sidewalk.What is the velocity of the flowerpot whenit strikes the ground? Choose upwards to bethe positive y direction. The acceleration ofgravity is 9.81 m/s2Answer in units of m/s. roseeldavis2 hours agoPhysicsHigh SchoolansweredPlease help me with this question soon.Block A - 19.3 Kg/LBlock B - 0.64 Kg/LBlock C - 0.70 Kg/LBlock D - 0.917 Kg/LBlock E - 3.53 Kg/L1) Which block has the greatest density?Block ABlock BBlock CBlock DBlock E2) Which block has the lowest density?Block ABlock BBlock CBlock DBlock E3) Submit your data table and identify the substance each block is made of. Thoughts on GOP activists claiming that Biden's student loan giveaway is an attempt towin over young voters before the midterm elections. share a whole pizza, cake and orange equally with your friend. what fraction do you get? Approximately how many atoms thick is a cell membrane, assuming all atoms there average about twice the size of a hydrogen atom?. Read the following sentences from the text. Thats not all, said Mikes mom. The organs in your body are made of various tissues. For example, your heart is made of all four types of tissue. All of the tissues in your heart work together to pump blood through your body. The heart is one of five vital organs in humans. The other vital organs are the brain, kidneys, liver, and lungs. So these organs are important in keeping me alive? asked Mike. Yeah, and each organ performs its specific function because of the tissues that constitute it. As used in this sentence, what does the word constitute most nearly mean? what is the time answer it Write a sentence to describe how an unethical recruiter could use statistics to mislead prospective employees commonlit; A TEEN AND A TROLLEY REVEAL SOCIETY'S DARK SIDE question 2 ; why is the trolley problem a good way to uncover people's biases In order to store fourfold as much energy, how much charge should it have on its plates? Figure DEF is an isosceles triangle. The measure of D is 55. Select all the possible measures of A. 55B. 60C. 70D. 110E. 125 Post-procedural care for patients who have had a colon examination should include?