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
Lelechka [254]
3 years ago
5

Any part of the computer that you plug into the CPU like a phone, tablet, headphones etc. are called

Computers and Technology
1 answer:
gtnhenbr [62]3 years ago
8 0

Answer:

usb

Explanation:

You might be interested in
For a set of integers stored in an array,calculate the sum of the positive numbers and the sum of the negative numbers. The prog
Radda [10]

Answer: The c++ program to implement the given conditions is shown below.

#include <iostream>

using namespace std;

int main()

{

// used as index of array in the loop for calculating the sum

   int i=0;

// array contains both negative and positive integers

// 0 is used as the sentinel value

   int arr[12]={-9,-8,-3,-12,-78,-10,23,45,67,1,0};

   int positiveSum=0, negativeSum=0;

   do

   {

       if(arr[i]<0)

           negativeSum = negativeSum + arr[i];

       if(arr[i]>0)

           positiveSum = positiveSum  + arr[i];

// after every element is added, index of array represented by i is incremented

       i++;

   }while(arr[i]!=0);

// loop continues till end of array is reached

   cout<<"Sum of positive integers "<<positiveSum<<" and sum of negative integers "<<negativeSum<<endl;

   return 0;

}

OUTPUT

Sum of positive integers 136 and sum of negative integers -120

Explanation: This program declares and initializes an integer array without user input. As mentioned in the question, 0 is taken as the sentinel value which shows the end of data in the array.

   int arr[12]={-9,-8,-3,-12,-78,-10,23,45,67,1,0};

All the variables are declared with data type int, not float. Since, integers can yield integer result only.

The do-while loop is used to calculate the sum of both positive and negative integers using int variable i. The variable i is initialized to 0.

This loop will run till it encounters the sentinel value 0 as shown.

while(arr[i]!=0);

Hence, all the integers in the array are read one at a time and sum is calculated irrespective of the element is positive or negative.

       if(arr[i]<0)

           negativeSum = negativeSum + arr[i];

       if(arr[i]>0)

           positiveSum = positiveSum  + arr[i];

After the element is added, variable i is incremented and loop is continued.

The do-while loop tests positive and negative integers based on the fact whether their value is greater than or less than 0.

The program can be tested using different size and different values of positive and negative integers in the array.

7 0
4 years ago
What is the difference between being an affiliate and an independent station ?what are the benefits to being an affiliate
katen-ka-za [31]

Answer:

So the difference is one does its own thing the other is someone who is working with another.The benifits are that if it is something good done you both get the reward the bad part is that if its bad then you both get in trouble for it.

Explanation:I hope this helps

6 0
3 years ago
Match the items with their respective descriptions.
kap26 [50]

a is 3

b is 1

c is 2

d is 4

7 0
3 years ago
Read 2 more answers
How is a transaction verified on a cryptocurrency network?.
Agata [3.3K]

Answer:

By being a part of a block to a block chain and each block in the block chain is precisely connected to the block that was before it.

Explanation:

I Hope This Helps You

6 0
3 years ago
Write a program that asks the user for three names, then prints the names in reverse order.
sasho [114]

Answer:

The program written in C++ is as follows'

#include<iostream>

using namespace std;

int main()

{

string names[3];

cout<<"Please enter three names: "<<endl;

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

{

cin>>names[i];

}

for (int i = 2; i>= 0;i--)

{

cout<<names[i]<<endl;

}

return 0;

}

Explanation:

This line declares an array for 3 elements

string names[3];

This line prompts user for three names

cout<<"Please enter three names: "<<endl;

This following iteration lets user input the three names

for (int i = 0; i< 3;i++)  {  cin>>names[i];  }

The following iteration prints the three names in reverse order

for (int i = 2; i>= 0;i--)  {  cout<<names[i]<<endl;  }

8 0
3 years ago
Other questions:
  • Define the method object inc_num_kids() for PersonInfo. inc_num_kids increments the member data num_kids.Sample output for the g
    11·1 answer
  • For local travel addresses and street names should be
    14·1 answer
  • Which logic gate produces an output of 1 only if both it’s inputs are 0?
    10·2 answers
  • Which entity might hire a computer systems analyst to help catch criminals?
    14·2 answers
  • ________________ is a new method or idea or product or enhancement or other means of adding value to an existing product, such t
    14·1 answer
  • What’s the difference between the logical and physical structure of a file? What are the advantages of not having an application
    15·1 answer
  • You have read about the beginnings of the Internet and how it was created. What was the Internet originally created to do? (sele
    10·2 answers
  • If you face an investigation where dangerous substances might be around, you may need to obtain which of the following?
    13·2 answers
  • You are going to visit a national park, and have never been there before. You are using a map to try and make the distance trave
    11·1 answer
  • what is the reason for assigning the management of file sharing, security, and quotas to administrators . why would it be pruden
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!