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
The process of _____ determines what volume a system can handle by comparing its performance to standards in the industry? horiz
Alina [70]

BENCHMARKING

option C

5 0
3 years ago
Read 2 more answers
does an access control list looks for patterns of traffic between multiple packets and takes action to stop detected attacks?
Kryger [21]

The access control list searches for patterns in the communication between different packets and responds to any assaults that are found.

<h3>What is the access control list?</h3>

An access control list searches for patterns in the communication between different packets and responds to any assaults that are found.

Based on the IP header data, such as the source or destination IP address, protocol, or socket number, an access control list filters traffic.

Thus, the access control list searches for patterns in the communication between different packets and responds to any assaults that are found.

Learn more about the access control list here:

brainly.com/question/13718195

#SPJ4

5 0
1 year ago
You can copy a selected shape by holding down the ____ key and then dragging the shape.
marshall27 [118]

Answer:

Option A is the correct choice answer for the above question.

Explanation:

In an MS-Powerpoint document, when a user wants to copy the selected shape and drag that shape for use in slides then he needs to--

  1. Select the shape
  2. Press the Ctrl key and
  3. drag that shape on the slide of the powerpoint.

Then the user gets the shape on the slide for their personal use.

The question scenario also suggests the same which is described above. hence Option A is the correct answer while the other is not because--

  • Option B suggests 'ESC' which is used to escape any running program.
  • Option C suggests about ALT key which is of no use for the MS-Powerpoint document.
  • Option D suggests about TAB key which is used to make the space between two texts or diagram.
5 0
2 years ago
Read 2 more answers
What is a current Gdp and what is a real Gdp?
SpyIntel [72]
Do u mean GPD? OORRR
5 0
3 years ago
Read 2 more answers
To prepare his book report on The Adventures of Tom Sawyer, Anand must research life on the Mississippi River in the 1800s. Whic
Viefleur [7K]
He should reread and find arcticles about life on the Mississippi River in the 1800s
3 0
3 years ago
Read 2 more answers
Other questions:
  • ________ are hardware devices or software programs that direct messages as they travel between networks.
    15·1 answer
  • It is difficult to use screening questions in computer-assisted surveys. <br> a. True <br> b. False
    8·1 answer
  • A student is curious about how a Web site appears on his computer screen. On a piece of paper,
    9·1 answer
  • What is are motor vehicle emissions?
    8·1 answer
  • mr. Jones put the same amount of soil around each of the five plants he has six bags of soil how many bags of potting soil did m
    14·1 answer
  • A stateless firewall inspects each incoming packet to determine whether it belongs to a currently active connection.
    9·1 answer
  • 15 points. Please give an actual answer and not some random thing. this is not just free points. Correct answer will receive bra
    12·2 answers
  • Sarah is starting her first job at the local ice cream shop. what can Sarah do to make a good impression on her first day of wor
    13·2 answers
  • Write a program code which asks for 80 numbers between 100 and 1000 to be entered.
    7·1 answer
  • What power points feature will you use to apply motion effects to different objects of a slide
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!