1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kumpel [21]
3 years ago
14

) Consider the array called myArray declared below that contains and negative integers. Write number of positive integers in the

array. That is, your loop display the message "Number of positive integers is 5" a loop statement to count and display the should (4 points) int myArray[]卟1,3,-9,9,33,-4,-5, 100,4,-23); Note: The loop should always work without modification even if the values in th array are changed
Computers and Technology
1 answer:
grigory [225]3 years ago
6 0

Answer:

#include <iostream>

using namespace std;

int main()

{

 

  int arr[]={3,-9,9,33,-4,-5, 100,4,-23};

  int pos;

  int n=sizeof(arr)/sizeof(arr[0]);

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

      if(arr[i]>=0){

          pos++;

      }

  }

  cout<<"Number of positive integers is "<<pos<<endl;

  return 0;

}

Explanation:

create the main function in the c++ programming and declare the array with the element. Then, store the size of array by using the formula:

int n=sizeof(arr)/sizeof(arr[0]);

after that, take a for loop for traversing the array and then check condition for positive element using if statement,

condition is array element greater than or equal to zero.

if condition true then increment the count by 1.

this process happen until the condition true

and finally print the count.

You might be interested in
Problem Statement − Suppose the problem statement at hand is to contain the attrition that happens in companies worldwide. High
Tju [1.3M]

Answer:Analysis is derived from the Greek word ‘analusis’, which translates into ‘breaking up’ in English. Analysis is older than the times of great philosophers like Aristotle and Plato. As discussed in the previous section, analysis is the process of breaking down a big single entity into multiple fragments. It is a deduction where a bigger concept is broken down to smaller ones. This breaking down into smaller fragments is necessary for improved understanding.

So, how does analysis help in design thinking? During analysis, design thinkers are required to break down the problem statement into smaller parts and study each one of them separately. The different smaller components of the problem statement are to be solved one-by-one, if possible. Then, solutions are thought for each of the small problems. Brainstorming is done over each of the solutions.

Later, a feasibility check is done to include the feasible and viable solutions. The solutions that don’t stand firm on the grounds of feasibility and viability are excluded from the set of solutions to be considered.

Design thinkers are, then, encouraged to connect with the diverse ideas and examine the way each idea was composed. This process of breaking down the bigger problem statement at hand into multiple smaller problem statements and examining each as a separate entity is called analysis.

Reductionism

The underlying assumption in analysis is reductionism. Reductionism states that the reality around us can be reduced down to invisible parts. The embodiment of this principle is found in basic axioms of analytic geometry, which says “the whole is equal to the sum of its parts”. However, understanding of a system cannot be developed by analysis alone. Hence, synthesis is required following analysis.

Synthesis

Synthesis refers to the process of combining the fragmented parts into an aggregated whole. It is an activity that is done at the end of the scientific or creative inquiry. This process leads to creation of a coherent bigger entity, which is something new and fresh. How does synthesis come into picture in design thinking?

Once the design thinkers have excluded the non-feasible and non-viable solutions and have zeroed-in on the set of feasible and viable solutions, it is time for the thinkers to put together their solutions.

Out of 10 available solutions, around 2-3 solutions may need to be excluded since they may not fit into the larger picture, i.e. the actual solution. This is where synthesis helps.

The design thinkers start from a big entity called the problem statement and then end up with another bigger entity, i.e. the solution. The solution is completely different from the problem statement. During synthesis, it is ensured that the different ideas are in sync with each other and do not lead to conflicts.

Analysis + Synthesis = Design Thinking

Analysis and synthesis, thus, form the two fundamental tasks to be done in design thinking. Design thinking process starts with reductionism, where the problem statement is broken down into smaller fragments. Each fragment is brainstormed over by the team of thinkers, and the different smaller solutions are then put together to form a coherent final solution. Let us take a look at an example.

Analysis Synthesis

Case Study

Problem Statement − Suppose the problem statement at hand is to contain the attrition that happens in companies worldwide. High quality employees leave the organization, mainly after the appraisal cycle. As a result, an average company loses its valuable human resources and suffers from overhead of transferring the knowledge to a new employee. This takes time and additional human resource in the form of a trainer, which adds to the company’s costs. Devise a plan to contain attrition in the company.

Analysis − Now, let’s break down the problem statement into various constituent parts. Following are the subparts of the same problem statement, broken down to elementary levels.

The employees are not motivated anymore to work in the company.

Appraisal cycle has something to do with attrition.

Knowledge transfer is necessary for new employees.

Knowledge transfer adds to the cost of the company.

Synthesis − Now, let's start solving each problem individually. In this step, we will do synthesis. Let's look at one problem at a time and try to find a solution only for that problem statement, without thinking of other problem statements.

Explanation:

6 0
2 years ago
Match the tool to its description.
topjm [15]

Answer:

Reveal formating- A

Clear formatting-B

Apply formatting of the surrounding text-D

Format painter-C

Explanation:

7 0
2 years ago
Read 2 more answers
1) If a robot has a 3 bit instruction set and needs 20 instructions to reach its destination, how many bits of memory are requir
mariarad [96]

Answer:

Explanat500,000ion:

8 0
2 years ago
An example of an asset that is both personal-use and personal property is:•A. A computer used solely to monitor the CEO's invest
kati45 [8]

Answer:

Option A is correct.

Explanation:

The following is an illustration of such a resource which is also personal usage as well as corporate capital, that system required primarily to track the contribution of both the Chief executive and also to execute the Form 1040.

  • Option B is incorrect because the system required exclusively to email workers concerning the operations of the organization isn't an illustration of such a resource which is both personal usage and commercial property.
  • Option C is also incorrect because it is seen that the following option is not the illustration of such a scenario.
  • Option D is incorrect because the storage facility being required through the Chief executive to preserve confidential documents is not the correct illustration of such a scenario.
  • Option E is incorrect because there are not all the resources are for the personal as well as commercial use.
7 0
2 years ago
Betsy recently assumed an information security role for a hospital located in the United States. What compliance regulation appl
IceJOKER [234]

HIPAA compliance regulation applies specifically to healthcare providers

c. HIPAA

<u>Explanation:</u>

HIPAA stands for Health Insurance Portability and Accountability Act. HIPAA applies to specifically to healthcare providers.

It is a law which was designed to provide privacy standards to protect the patient's medical records, reports and other health information which may be sensitive or confidential provided to health plans, doctors, hospitals and other health care providers.

7 0
3 years ago
Other questions:
  • A weak fuel to air mixture along with normal airflow through a turbine engine may result in?
    8·1 answer
  • Write a function called simulate_several_key_strikes. It should take one argument: an integer specifying the number of key strik
    7·1 answer
  • function calculate () { var s = 2; var x = 2; var y = 3; if (x &gt; 4) { s=s+ 2; } else if ( y &gt; 4) { s=s+ 4; } else { s+=3;}
    11·1 answer
  • Which is a basic job requirement for a career in corrections services?
    13·1 answer
  • Which type of system is used to analyze, evaluate, and integrate the output of other systems?
    5·2 answers
  • What is the output?
    5·1 answer
  • What's your opinion on Pokemon​ and pixeldip
    5·1 answer
  • _____________are where you get down to business and enter data in a worksheet
    12·1 answer
  • Why is my internet slow even though the speed test says it is fast
    12·1 answer
  • Hello, I've tried everything and I cannot get this code to be fair. I need help. Can someone provide guidance so I can understan
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!