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
Question 7 (1 point)<br> Increasing hue levels means increasing saturation.<br> True<br> False
Temka [501]

Answer:

mae me brainlier

false

7 0
3 years ago
Which slideshows design can not be use?
Readme [11.4K]

Answer:

Is there suppose to be a pic ?

Explanation:

7 0
3 years ago
10 pts
atroni [7]

Answer:

the answer would be C, function

8 0
3 years ago
the grade point average collected from a random sample of 150 students. assume that the population standard deviation is 0.78. f
salantis [7]

Answer:

E =  14.81\%

Explanation:

Given

n = 150

\sigma = 0.78

c = 0.98

Required

The margin of error (E)

This is calculated as:

E = z * \frac{\sigma}{\sqrt{n}}

When confidence level = 0.98 i.e. 98%

The z score is: 2.326

So, we have:

E = 2.326 * \frac{0.78}{\sqrt{150}}

E = 2.326 * \frac{0.78}{12.247}

E =  \frac{2.326 *0.78}{12.247}

E =  \frac{1.81428}{12.247}

E =  0.1481

Express as percentage

E =  14.81\%

3 0
3 years ago
Consider the following code:
pishuonlain [190]

In python the % operator is modulo. Modulo returns the remainder of two numbers.

19 % 5 = 4 therefore,

print(x%y) would output 4

7 0
3 years ago
Other questions:
  • Using the bitwise AND operation, the result of 1 AND 0 is ___________. 10100100 ___________ 11010101 = 01110001. A common way to
    15·1 answer
  • Which character is used to begin a comment?
    6·1 answer
  • Which item converts a high level language program to low level machine instruction?
    5·1 answer
  • Create a function called "strip_r_o" that takes in a STRING and strips all the Rs and Os from the string. Also use a FOR loop in
    7·1 answer
  • Rideshare companies like Uber or Lyft track the x,y coordinates of drivers and customers on a map. If a customer requests a ride
    5·1 answer
  • Is it okay for potential employers to search your social media for use in determining if you are a fit for the position?
    15·1 answer
  • When would it be appropriate to run MS Office or Adobe on the Windows OS server ?
    10·1 answer
  • Which of these statements performs real number quotient division using type casting?
    10·1 answer
  • Colours can be contrasting if<br>​
    9·1 answer
  • Class Main {
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!