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
While working alone at their respective constant rates, computer X processes 240 files in 4 hours and computer Y processes 240 f
RSB [31]

Answer:

8/3 hours

Explanation:

For this question, let us say that 1 job contains 240 files

Computer X does this job in 4 hours

Computer Y does the same job in 8 hours

All we need to find is how long it will take both computers to finish the job

Now we apply the basic combined work formula, which is

Combined Time = (time a * time b)/(time a + time b)

And we known that time a = 4 hrs,

We then substitute this values into the equation to get

Combined time = (4*8)/(4+8)

= 32/12

= 8/3 hours

6 0
3 years ago
You can display content variations to mobile, tablet or desktop users.
umka21 [38]

Answer:

The following statement is true.

Explanation:

Because the user easily monitors the content variations by using some applications or software for the mobile or desktops without facing any difficulties in displaying the several content. If they facing some issues then, there is the problem of their mobile or computer or maybe any issues occurs in their application according to the configuration of their system.

7 0
3 years ago
I'm surprised I haven't even got a single warning yet lol
dangina [55]

Answer:

Thats good

Explanation:

Thanks for the points~! ;)

7 0
2 years ago
The IT director instructed the systems administrator to build a server to support the accounting department's file growth. The I
Mamont248 [21]

Answer:

Option (C) FAT32 File System Type

Explanation:

  • FAT32 File System Type cannot be encrypted by the accounting users.
  • FAT stands for File Allocation Table. It is a file system architecture.
  • The File Allocation Table is an index table which contains the details about each cluster ( disk storage space ).
  • By traversing the File Allocation Table, the operating system gets the details the file ( where it is located ) and the size of the file.
  • The FAT32 file system contains more number of possible clusters.
  • In this system, 32 bits are used to store the total number of possible clusters.
  • In FAT32 file system, the transparent encryption is not supported.
  • So, option (C) is correct.
  • All other options are wrong options.
3 0
3 years ago
Which of the following is time-dependant? Group of answer choices
Nookie1986 [14]

Answer:

A dynamic model accounts for time-dependent changes in the state of the system,

while a static model calculates the system in equilibrium, and thus is time-invariant.

Dynamic models typically are represented by differential equations or difference equations

7 0
3 years ago
Other questions:
  • Cryptolocker is an example of what type of malware?
    11·1 answer
  • A program called the ______ combines the object program with other programs in the library and is used in the program to create
    5·1 answer
  • An excel user should use a relative cell reference when it is important to ____. preserve the relationship to the formula locati
    7·1 answer
  • Which best describes color blindness?
    8·1 answer
  • Write a program with a method computeCommission which takes a double that is the salesAmount and returns the commissions for sal
    9·1 answer
  • A musical time measurer is a(an)
    10·1 answer
  • Create a two functions: first called grocery_cost(food), where food can be one item or a list of items from the stock and price
    7·1 answer
  • HELP 100 points
    9·1 answer
  • Which option is typically only used when utilizing self joins?
    8·1 answer
  • What the difference between an operating system drive and a storage drive?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!