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
I am not a living being, I am a cylindrical shape that has three to eight sides. I never die. I can build anything again. What i
Setler79 [48]

Answer:

A shape

Explanation:

4 0
3 years ago
The purchase of one cup of coffee a day what's going to do
xz_007 [3.2K]
Well if you add it up , if one cup of coffe is $1, then in one year it would be $365 on coffe.
7 0
3 years ago
Read 2 more answers
HEYY GUYS START REPORTING ALL THE SPAMMERS PLSS!!!!! For the spammers, I hope you go to hell &gt;:c!!!!!!!!!!!
Molodets [167]

Answer:

i totally agree

Explanation:

4 0
3 years ago
1:A presentation program which is developed by Microsoft
LekaFEV [45]
Option 3: PowerPoint.
4 0
2 years ago
Read 2 more answers
Why is it important to write something in the subject line of emails?
marin [14]
So the person can know what you want and it helps keep better track of emails and subject matters
8 0
3 years ago
Read 2 more answers
Other questions:
  • Derek has an interest in designing video games. What requirements should he fulfill to be a game designer?
    13·1 answer
  • Write a Java application that inputs a series of 10 integers and determines and prints the largest and smallest integer. Use a c
    12·1 answer
  • What can I do if my mouse on my laptop keeps freezing on me for 5 minutes
    11·1 answer
  • List some good names for devices on your home network or on the network in your school's lab. Demonstrate the use of best practi
    13·1 answer
  • Mary is entering her senior year of college. She has a meeting on Friday with her advisor to discuss her career plans.Mary is al
    15·1 answer
  • Only technical managers needs to know about programming, web view source code and about technology issues.
    12·1 answer
  • Suppose you are choosing between four different desktop computers: one is Apple MacIntosh and the other three are PC-compatible
    15·1 answer
  • 15) Three primary activities of a program are: A) Variables, Operators, and Key Words B) Lines, Statements, and Punctuation C) I
    11·1 answer
  • List any three importance of computer points​
    8·1 answer
  • What type of malicious software technology is used to download and install software without the user's interaction?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!