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
kumpel [21]
3 years ago
14

) Consider the array called myArray declared below that contains and negative integers. Write number of positive integers in the

array. That is, your loop display the message "Number of positive integers is 5" a loop statement to count and display the should (4 points) int myArray[]卟1,3,-9,9,33,-4,-5, 100,4,-23); Note: The loop should always work without modification even if the values in th array are changed
Computers and Technology
1 answer:
grigory [225]3 years ago
6 0

Answer:

#include <iostream>

using namespace std;

int main()

{

 

  int arr[]={3,-9,9,33,-4,-5, 100,4,-23};

  int pos;

  int n=sizeof(arr)/sizeof(arr[0]);

  for(int i=0;i<n;i++){

      if(arr[i]>=0){

          pos++;

      }

  }

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

  return 0;

}

Explanation:

create the main function in the c++ programming and declare the array with the element. Then, store the size of array by using the formula:

int n=sizeof(arr)/sizeof(arr[0]);

after that, take a for loop for traversing the array and then check condition for positive element using if statement,

condition is array element greater than or equal to zero.

if condition true then increment the count by 1.

this process happen until the condition true

and finally print the count.

You might be interested in
Point out the correct statement.
NeTakaya

Answer:

Option D is correct.

Explanation:

Cassandra labeling information with such a gravestone indicates should restart transmitting an erase request to such a duplicate that had been down earlier of deletion.

Cassandra may not instantly delete information labeled for removal from disc the removal of identified information takes place throughout compaction a deleted section may reappear when a maintenance is never regularly carried out.

4 0
2 years ago
50 points! ㅠㅠ does anyone speak korean or watch korean animes? 안녕 ㅋㅋ ㅇㅅㅇ How do people make animationsss.
aleksklad [387]

Answer:

Explanation Well depends on what type of animations your asking for but Anime is almost entirely drawn by hand but It also takes skill to create hand-drawn animation and experience to do it quickly. ... They're the ones who make all the individual drawings after the top-level directors come up with the storyboards and the middle-tier “key animators” draw the important frames in each scene it has a lot of process .

6 0
3 years ago
Read 2 more answers
Hi there! I am writing a code to make a square using a drone, however I’m having trouble doing so. The website that I’m writing
Jlenok [28]

Answer:

i might

Explanation:

3 0
2 years ago
What does a spam e-mail normally promise you?
nlexa [21]
The answer is a virus
7 0
3 years ago
What led to fall of axum?
stiks02 [169]
The main factors that led to the fall of the Aksum in the seventh century were climate change and the obstruction of international trade routes around the Red Sea brought on by the growing supremacy of the Muslims in Ethiopia.<span> Other contributing factors included a reduced crop yield due to excess cultivation of land, Persian interference and the rise of Christianity in the region.</span>
3 0
2 years ago
Read 2 more answers
Other questions:
  • Ad designers use movement in order to
    9·2 answers
  • What should a career plan include?
    7·1 answer
  • PLEASE HELP!
    13·2 answers
  • Search engines enable you to
    9·2 answers
  • The most widely used presentation software program is Microsoft PowerPoint. You can produce a professional and memorable present
    5·1 answer
  • 6. Identify the process of adding a value at the end of the sequence to ensure an input sequence by
    6·1 answer
  • Anyone free to inbox me plz....​
    6·2 answers
  • What are the two ways that assets are
    5·1 answer
  • What are some ways to find out what skills you need to develop at work? Check all of the boxes that apply.
    15·2 answers
  • The full meaning of UNIVAC and ENIAC​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!