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
The technique of ________ uses three columns that allows the entrepreneur to weigh both the advantages and the disadvantages of
Mekhanik [1.2K]
Force-field analysis
5 0
3 years ago
Which section of a personal narrative requires the most development
attashe74 [19]
D. Plot because a,b,and c is consider plot can i have brainlest answer please

5 0
4 years ago
What are creative commons?
Olenka [21]

Answer:

c

Explanation:

4 0
3 years ago
Read 2 more answers
In response to an alert regarding a possible security incident, you are analyzing the logs for a web application. In the process
SOVA2 [1]

The type of attack was most likely attempted against the application is an  XSS attack.

<h3>Why is the above an  XSS attack?</h3>

This attack is known to be an example of an XSS attack as it is one that is often recorded by the log of a web server's log.

Conclusively, Note that in this attack, if you see the HTML encoding, one can say that is mainly an XSS attack but when you see SQL or XML statements in the string, then it is another.

Learn more about attack from

brainly.com/question/76529

#SPJ1

4 0
2 years ago
Use the __________ property to configure bold text using css
tatuchka [14]
Use the 'font-weight' property.

To put it in perspective, 'font-weight: 400' is the same boldness as normal text, whereas 'font-weight' 700 is the same boldness as a regular bold font.
5 0
4 years ago
Other questions:
  • Assume the integer variable num has been assigned a valid value. What is the purpose of the following code segment?
    14·1 answer
  • What aspect of web design is Gloria following when she uses the same color
    5·2 answers
  • Proper __ management is essenciales for meeting project deadlines​
    11·1 answer
  • Insert the missing code in the following code fragment. This fragment is intended to read an input file named dataIn.txt and wri
    13·1 answer
  • Using complete sentences post a detailed response to the following.
    9·1 answer
  • I need the answer ASAP. I’ll mark brainliest if right
    5·1 answer
  • Why isn't image display working on wacom tablet.
    8·1 answer
  • Which type of internet connection allows for high-speed bi-directional data communication over a hybrid fiber-coaxial (HFC) conn
    5·1 answer
  • Explain briefly how learning how to follow can make a person a good leader
    5·1 answer
  • Suppose you made an error while creating your document. You used the word b. Find and Replace dialog box "SDAM" instead of "SIMA
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!