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
JulsSmile [24]
3 years ago
10

Swapping two numbers

Computers and Technology
1 answer:
Tju [1.3M]3 years ago
8 0

Answer:

Swapping two numbers means exchange the values of two variables with each other.

You might be interested in
What is the most common type of storage device for transferring files from one computer to another?
exis [7]

Answer:

USB flash drives is the most common type of storage device for transferring files from one computer to another

4 0
3 years ago
Write a program to read as many test scores as the user wants from the keyboard (assuming at most 50 scores). Print the scores i
Oksana_A [137]

Answer: Provided in the explanation segment

Explanation:

Below is the code to carry out this program;

/* C++ program helps prompts user to enter the size of the array. To display the array elements, sorts the data from highest to lowest, print the lowest, highest and average value. */

//main.cpp

//include header files

#include<iostream>

#include<iomanip>

using namespace std;

//function prototypes

void displayArray(int arr[], int size);

void selectionSort(int arr[], int size);

int findMax(int arr[], int size);

int findMin(int arr[], int size);

double findAvg(int arr[], int size) ;

//main function

int main()

{

  const int max=50;

  int size;

  int data[max];

  cout<<"Enter # of scores :";

  //Read size

  cin>>size;

  /*Read user data values from user*/

  for(int index=0;index<size;index++)

  {

      cout<<"Score ["<<(index+1)<<"]: ";

      cin>>data[index];

  }

  cout<<"(1) original order"<<endl;

  displayArray(data,size);

  cout<<"(2) sorted from high to low"<<endl;

  selectionSort(data,size);

  displayArray(data,size);

  cout<<"(3) Highest score : ";

  cout<<findMax(data,size)<<endl;

  cout<<"(4) Lowest score : ";

  cout<<findMin(data,size)<<endl;

  cout<<"(5) Lowest scoreAverage score : ";

  cout<<findAvg(data,size)<<endl;

  //pause program on console output

  system("pause");

  return 0;

}

 

/*Function findAvg that takes array and size and returns the average of the array.*/

double findAvg(int arr[], int size)

{

  double total=0;

  for(int index=0;index<size;index++)

  {

      total=total+arr[index];

  }

  return total/size;

}

/*Function that sorts the array from high to low order*/

void selectionSort(int arr[], int size)

{

  int n = size;

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

  {

      int minIndex = i;

      for (int j = i+1; j < n; j++)

          if (arr[j] > arr[minIndex])

              minIndex = j;

      int temp = arr[minIndex];

      arr[minIndex] = arr[i];

      arr[i] = temp;

  }

}

/*Function that display the array values */

void displayArray(int arr[], int size)

{

  for(int index=0;index<size;index++)

  {

      cout<<setw(4)<<arr[index];

  }

  cout<<endl;

}

/*Function that finds the maximum array elements */

int findMax(int arr[], int size)

{

  int max=arr[0];

  for(int index=1;index<size;index++)

      if(arr[index]>max)

          max=arr[index];

  return max;

}

/*Function that finds the minimum array elements */

int findMin(int arr[], int size)

{

  int min=arr[0];

  for(int index=1;index<size;index++)

      if(arr[index]<min)

          min=arr[index];

  return min;

}

cheers i hope this help!!!

8 0
3 years ago
Which term describes a visual object such as a picture, a table, or a text box?
Nat2105 [25]

Answer:

A) Caption

Explanation:

This option makes the most sense. It's not Word Art or Comment. An illustration is like a drawing, so that's incorrect as well, leaving only caption as the correct answer.

Hope it helps!

8 0
2 years ago
Read 2 more answers
Think back over the information presented in the lesson about how you can skillfully use the Internet when doing research. Selec
madreJ [45]

Avoid wikipedia, anyone can put answers down on there and make it seem correct but it is not. Do not trust any website research the websites or look at ratings if possible. Use the answers that google provides itself if possible. And research trusted websites.

If this helped please mark me as brainlest.

\left[\begin{array}{ccc}Thanks,\\JustSomeIdiot\end{array}\right]

7 0
3 years ago
Rhea has been asked to interview the new CEO of an energy company. She has scheduled a meeting with him in the company’s meeting
vovikov84 [41]
The correct answer would be B
7 0
3 years ago
Read 2 more answers
Other questions:
  • In Word, tables can be styled much like text can.<br> True<br> False
    6·1 answer
  • Desmond must enter a long string of numbers (1 4 9 2 1 6 2 0 1 7 7 6) into an old computer every two hours or the computer will
    12·1 answer
  • Which of the following combines something you know, such as a password, with something you are (a biometric device such as a fin
    13·1 answer
  • What are the classifications of computer
    9·1 answer
  • Image-editing software is used to_____
    7·1 answer
  • Name all mario kart games in order
    15·2 answers
  • Which of these is the fastest transmission medium?
    11·2 answers
  • Help me asap please
    15·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
  • To verify a Windows system meets the minimum processor and memory requirements to install software, use the ________.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!