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
Given that Apache and Internet Information Services (IIS) are the two most popular web application servers for Linux and Microso
timama [110]

Answer:

One should continuously engage in Consistent testing of pin, and also keep monitoring all unauthorized activities.

8 0
3 years ago
Which word processing file that contains text and other
Oksi-84 [34.3K]

Answer:

B . document

Explanation:

Word document contains text, table, picture and more. Word document is a file of .doc, .docx etc format

Table, ribbon or keyboard can't be classed as a file and they are elements of a file, menu or hardware

<u>So correct option is</u> B. Document

7 0
3 years ago
Read 2 more answers
Select the correct answer.
Vsevolod [243]

Philip is working with Adobe Photoshop to create some artwork for his college magazine. Which file format is he most likely to use with this
software?


C. JPEG
3 0
3 years ago
How are web design &amp; web development different from each other?
Margarita [4]

Answer:

Developers are people who build a website's core structure using coding languages, while designers are more visually creative and user-focused. Developers use their programming knowledge to breathe life into the designer’s creative vision.

You could think of developers as construction workers, and web designers as architects – both necessary, but different, skill sets.

I hope this helped :D

Explanation:

3 0
3 years ago
A user clicked an email link that led to a website than infected the workstation with a virus. The virus encrypted all the netwo
Leno4ka [110]

Answer:

D

Explanation:

A zero-day vulnerability is a computer-software vulnerability that is unknown to those who would be interested in mitigating the vulnerability. Until the vulnerability is mitigated, hackers can exploit it to adversely affect computer programs, data, additional computers or a network. An exploit directed at a zero-day vulnerability is called a zero-day exploit, or zero-day attack.

5 0
3 years ago
Other questions:
  • The four functions of a computer are
    5·1 answer
  • Discussion group may have a___________ who monitors the postings and enforces the sides rules​
    13·1 answer
  • What technique can improve web search results? Add articles, prepositions, and pronouns Be general rather than specific Focus on
    10·1 answer
  • The design of a blog refers to:
    10·1 answer
  • How should a Salesforce Admin fulfill those requirements? Universal Containers launches a Partner Community for their resellers
    13·1 answer
  • if a second system failure occurs while the first recovery is in progress, what needs tobe done after the system recovers for th
    11·1 answer
  • Who is the prince of math?
    5·2 answers
  • The other term for template document is _______.
    13·2 answers
  • Which is government departments fund the Global Positioning System
    6·1 answer
  • A(n) _____ is a data validation rule that should be applied to mandatory data items.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!