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
zhenek [66]
3 years ago
14

Write a loop statement to count and display the number of positive integers in the array. That is, your loop should display the

message "Number of positive integers is 5". int myArray[] = { -1, 3, -9, 9, 33, -4, -5, 100, 4, -23};
Computers and Technology
1 answer:
dlinn [17]3 years ago
3 0

Answer:

int count =0;

    for(int i=0;i<10;i++)

    {

        if(myArray[i]>=0)

        {

            count++;

        }

    }

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

Explanation:

The above written loop is for counting positive integers in the myArray[].

For counting we have taken a count integer initialized with 0.On iterating over the array if the element is greater than or equal to 0 we consider it as positive and increasing the count.At the end printing the count.

You might be interested in
Checking tire pressure should be performed:
vladimir2022 [97]

I would say the answer is D. Both A and C  because when it gets cold, the tires tend to become flat . You should also check once a month to make sure everything is fine especially after driving for a while!

8 0
3 years ago
Read 2 more answers
This procedure protects against the loss of data
Arte-miy333 [17]
Data Backup and Recovery is the procedure that protects against the loss of data. It is to protect the crucial data against losing in events like physical disaster, database corruption, hardware failures, and other incident that can cause the data to lose.
6 0
3 years ago
Carbon copy others who are..
My name is Ann [436]

Answer:

Is it Multiple Choice Question?

5 0
3 years ago
Read 2 more answers
!!! 20 points !!!!!
puteri [66]

Answer: I need more info to answer this question

Explanation:

8 0
2 years ago
What is the real meaning of hack and crack?
vovangra [49]
Hack means hack computer and crack means I guess your behind
7 0
3 years ago
Other questions:
  • Jared does not update his computer’s system software. What threat does his computer face?
    9·1 answer
  • Blank are back and forth movement of matter that create sound​
    15·1 answer
  • Which type of computer operating system would be best for a large corporation?
    7·2 answers
  • Your wireless network has been breached and it seems as though the attacker has modified a portion of your data that is used wit
    12·1 answer
  • The program used to create the file where you want to insert the object is called the ____.
    12·1 answer
  • This problem has been solved!
    8·1 answer
  • The Internet may best be compared to a/an
    11·1 answer
  • Create a class to represent light bulbs
    7·1 answer
  • El botón de layout se usa para <br>​
    8·1 answer
  • Describe psychographic differences among the past five generations of Americans that you learned about in this course. What type
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!