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
IrinaK [193]
2 years ago
11

cout << "Part 1" << endl; // Part 1 // Enter the statement to print the numbers in index 4 and index 9 // put a spac

e in between the two numbers cout << endl; // Enter the statement to print the numbers 3 and 80 from the array above // put a space in between the two numbers cout << endl; // Enter the statement to change the number 1 in the array to be 12 // then write the statement to print out that number in the array cout << "\nPart 2" << endl; // Part 2 // Write a function called printAll. It takes in an array // and an integer that has the number of values in the array. // The function should print all the numbers in the array with // a space between each one. // Call the function on the line below. cout << "\nPart 3" << endl; // Part 3 // Write a function called printEven. It takes in an array and // an integer that has the number of values in the array. It prints // all the even numbers in the array with a space between each one. // This function returns the count of evens. int evens; // Call the function you just wrote and store the // answer in the variable evens declared above.
Computers and Technology
1 answer:
Margarita [4]2 years ago
3 0

Answer and Explanation:

#include <iostream>

using namespace std;

int printEven(int array[],int n)

{

int count=0;

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

{

if(array[i]%2==0)

{

count++;

cout<<array[i]<<" ";

}

}

return count;

}

void printAll(int array[],int n)

{

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

{

cout<<array[i]<<" ";

}

}

int computeTotalOdds(int array[],int n)

{

int count=0;

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

{

if(array[i]%2!=0)

{

count++;

 

}

}

return count;

}

int main()

{

int array1[20] = {3, 18, 1, 25, 4, 7, 30, 9, 80, 16, 17};

int numElements = 11;

cout << "Part 1" << endl;

cout<<array1[4]<<" "<<array1[9];

cout << endl;

cout<<array1[0]<<" "<<array1[8];

cout << endl;

array1[2]=12;

cout << "\nPart 2" << endl;

printAll(array1,numElements);

 

cout << "\nPart 3" << endl;

int evens;

evens=printEven(array1,numElements);

 

 

 

 

// This will print the number of evens in the array.

cout << endl << evens;

 

cout << "\nPart 4" << endl;

 

int total;

 

total=computeTotalOdds(array1,numElements);

cout << endl << total;

 

return 0;

}

You might be interested in
After the security breach at CardSystems Solutions, a security assessment of the security measures used at the company proved th
Verizon [17]

Answer:

Was not PCI DSS- compliant.

Explanation:

This is a payment Card industry data security standard which is an information security standard that deal with branded credit card.

8 0
3 years ago
CASE II AziTech is considering the design of a new CPU for its new model of computer systems for 2021. It is considering choosin
34kurt

Answer:

(a)The CPU B should be  selected for the new computer as it has a low clock cycle time which implies that it will implement the process or quicker when compared to the CPU A.

(b) The CPU B is faster because it executes the same number of instruction in a lesser time than the CPU A .

Explanation:

Solution

(a)With regards to  the MIPS performance metric the CPU B should be chosen for the new computer as it low clock cycle time which implies that it will implement the process or quicker when compared to the CPU A and when we look at the amount of process done by the system , the CPU B is faster when compared to other CPU and carries out same number of instruction in time.

The metric of response time for CPU B is lower than the CPU A and it has advantage over the other CPU and it has better amount as compared to CPU A, as CPU B is carrying out more execution is particular amount of time.

(b) The execution can be computed as follows:

Clock cycles taken for a program to finish * increased by the clock cycle time = the Clock cycles for a program * Clock cycle time

Thus

CPU A= 5*10^6 * 60*10^-9 →300*10^-3 →0.3 second (1 nano seconds =10^-9 second)

CPU B= 3 *10^6 * 75*10^-9 → 225*10^-3 → 0.225 second

Therefore,The CPU B is faster as it is executing the same number of instruction in a lesser time than the CPU A

6 0
3 years ago
It is the student’s responsibility to meet the expectations identified by a rubric.
Alja [10]

Answer:

True

Explanation:

6 0
2 years ago
Read 2 more answers
Draw and implement of an organization which have 125 employees. use the following features 1.email services 2.lan communication
Dimas [21]

An organisation usually hires employees which helps in the successful achievement of the goals of the organisation.

<h3>Implementation of an organisation</h3>

The implementation of an organisation can be carried out using the following features:

  • Email services: Email address can be assigned to different employees of the organisation.

  • LAN communication: Local Area Network is used by organisation to connect their computer devices to a server using a common communication line.

  • VLAN: This is known as Virtual Local Area Network which is created between two LAN's.

  • Security: This is set up by a company to guide their data from theft.

  • Storage: This is used by the organisation to store their data.

  • Server: This is a device that provides internet services to another computer in an organisation.

Learn more about LAN here:

brainly.com/question/26956118

#SPJ4

3 0
1 year ago
Which of the following concepts is linked the least with Henry Ford? A. interchangeable parts B. technology C. mass customizatio
Burka [1]

Answer:

C. mass customization

Explanation:

Based on the information provided within the question it can be said that the concept that is least linked to Henry Ford would be mass customization. This term refers to large corporation that allow customers to customize their products when ordering. Henry Ford has not done this with his car products and were all built based on his standards.

6 0
3 years ago
Other questions:
  • An ______ is a simplified image. [4 letters]​
    7·2 answers
  • You are provisioning a server with eight-core 3 GHz CMP that can execute a workload with an overall CPI of 2.0 (assuming that L2
    5·1 answer
  • What are 2 ways that technology can negatively impact the environment.
    8·2 answers
  • andy accidentally saved a file in the wrong folder. what is the quickest way to move the file? create a new file and save it in
    8·2 answers
  • Prompt the user to enter four numbers, each corresponding to a person's weight in pounds. Store all weights in a list. Output th
    5·1 answer
  • Given the following function definition, what modifications need to be made to the search function so that it finds all occurren
    7·1 answer
  • PLEASE HURRY!!<br> Look at the image below
    15·1 answer
  • Which option correctly identifies if the researcher’s approach was the best start in the following scenario and explains why?
    10·2 answers
  • A search will _____ determine the index of the goal.
    13·1 answer
  • Write code that declares a variable named minutes, which holds minutes worked on a job,
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!