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
Audra is creating a training document and would like to include an image that she sees on her screen that she has marked up for
kupik [55]

Answer:

the first and last one

Explanation:

give me brainilest

4 0
3 years ago
Read 2 more answers
What is an example of an Internet access problem?
galina1969 [7]

B.

it's literally common sense

4 0
3 years ago
Read 2 more answers
Sharon is thinking about opening a bakery. She knows she wants to set her own hours, reduce her stress and make a profit. But sh
kondaur [170]
C would not be a beginner move.

hope it helps
6 0
3 years ago
Underinflated tires flex too much and build up heat, which can lead to tire blowouts.
ziro4ka [17]
Driving on under-inflated tires is very dangerous. If tires pressure is too low, too much of the tire's surface area touches the road, which increases friction. The more friction you have, the more heat is applied to the tires. Then, too much heat will make them overheat which can cause tread separation and, yes, blowouts. Therefore, the answer is true.
5 0
3 years ago
When widgets, or portable chunks of code, are embedded on html pages and thereby help increase the functionality of those pages,
Anna11 [10]
<span>When widgets, or portable chunks of code, are embedded on html pages and thereby help increase the functionality of those pages, consumers embrace one of the greatest virtues of social media known as Collaboration.</span>
5 0
3 years ago
Other questions:
  • Before starting a spreadsheet, it is smarter to plan ahead and think through the design. true or false
    13·1 answer
  • The posterior auditory stream terminates in the ________ and is involved in ________.
    12·1 answer
  • How do you know if your phone has a virus?
    13·1 answer
  • If a user wants to add an expansion card to increase the memory of a computer, where should the user insert the card?
    12·2 answers
  • Microcomputers, different from those giant mainframes and supercomputers, are designed for individuals. In fact, the microcomput
    7·1 answer
  • Write a program that reads from a file called dictionary.txt which contains pairs of English and translated words separated by a
    12·1 answer
  • All of the following are examples of service learning opportunities exept
    11·1 answer
  • How do you change the Background image or picture on Windows desktop?
    9·1 answer
  • Task 2: Typing a School Speech
    12·1 answer
  • Which of the following are pointers?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!