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
crimeas [40]
4 years ago
6

Write a function named sortie that takes three integer parameters by reference and rearranges them in ascending order--the first

parameter being the smallest, the third parameter being the largest. A program file is provided. A comment in the file indicates where the function should be written.
Computers and Technology
1 answer:
Nadusha1986 [10]4 years ago
7 0

Write a function named sortie that takes three integer parameters by reference and rearranges them in ascending order--the first parameter being the smallest, the third parameter being the largest.

Explanation:

#include <stdio.h>

using namespace std;

int main()

{

cout<<"Enter 3 number";

int first, second, third;

cin>>first>>second>>third;

cout<<endl;

cout<<"Unsorted :"<<first<<","<<second<<","<<third<<endl;

sortie(first,second,third);

cout<<"Sorted :"<<first<<","<<second<<","<<third<<endl;

return 0;

}

  • Three numbers are inputted from the user.
  • Sortie function is used to sort the data in specified places.
You might be interested in
When saving a memo you created in Word, which one of the following extensions is automatically assigned to the document?
VMariaS [17]
What are the options and if it's meaning like when you save something it has .pdf .jpg or .doc after the title then it would be ".doc"
8 0
3 years ago
Suppose that a local area network requires seven letters for user names.​ lower- and uppercase letters are considered the same.
Naddik [55]
<span>If a user name can have seven letters (with no distinction between upper and lower case), and if a letter can be repeated, then the maximum number of names is 26x26x26x26x26x26x26, or 8,031,810,176. That is, slightly more than eight billion names are possible.</span>
6 0
3 years ago
Write a program that grades arithmetic quizzes as follows: Ask the user how many questions are in the quiz. Ask the user to ente
kirill115 [55]

Answer:

The program in C++ is as follows:

#include <iostream>

using namespace std;

int main(){

   int questions, answer;

   cout<<"Questions: ";

   cin>>questions;

   int answerkey[questions];

   cout<<"Enter answer keys: ";

   for(int i = 0; i< questions; i++){

       cin>>answerkey[i];    }

   int correct = 0;

   cout<<"Enter answers: ";

   for(int i = 0; i< questions; i++){

       cin>>answer;

       if(answer == answerkey[i]){

           correct++;        }    }

   cout<<"Correct answers: "<<correct<<endl;

   cout<<"Percentage correct : "<<(100 * correct)/questions<<"%";

   return 0;

}

Explanation:

This declares the number of questions and the answers submitted to each equation

   int questions, answer;

Prompt to get the number of questions

   cout<<"Questions: ";

This gets input for the number of questions

   cin>>questions;

This declares the answerkey as an array

   int answerkey[questions];

Prompt to get the answer key

   cout<<"Enter answer keys: ";

This iteration gets the answer key for each question

<em>    for(int i = 0; i< questions; i++){</em>

<em>        cin>>answerkey[i];    }</em>

This initializes the number of correct answers to 0

   int correct = 0;

Prompt to get the enter the answers

   cout<<"Enter answers: ";

This iterates through the answer keys

   for(int i = 0; i< questions; i++){

This gets the answer to each question

       cin>>answer;

This compares the answer to the answer key of the question

       if(answer == answerkey[i]){

If they are the same, correct is incremented by 1

           correct++;        }    }

Print the number of correct answers

   cout<<"Correct answers: "<<correct<<endl;

Print the percentage of correct answers

   cout<<"Percentage correct : "<<(100 * correct)/questions<<"%";

7 0
3 years ago
The collection of computer instructions and other files that constitute a piece of software is
lutik1710 [3]
The answer would be
A. Codebase

8 0
3 years ago
Read 2 more answers
What Network does zoom run on? Does anyone use it (hint Hint)
rewona [7]

Answer:

  • The bandwidth used by Zoom will be optimized for the best experience based on the participant's' network. It will automatically adjust for 3G, WiFi, or wired environments.
  • i use g00gle meet bc zoom does not work on my school macbook...

Explanation:

:)

3 0
3 years ago
Other questions:
  • "Which of the following will help protect against a brute force attack?
    11·1 answer
  • Discus the pros and cons of Internal cloud service and External cloud service for both Infrastructure as a service and Applicati
    11·1 answer
  • The score of a student in two subjects are inserted in the B2 and C2 cells and the passing score for each subject is 60. Which o
    13·1 answer
  • Which key removes all data from an active cell with one click? A. Esc B. Delete C. Tab D. F2
    9·2 answers
  • How hot is to hot for my computer?
    11·2 answers
  • give the difference between functional and functional tools in the middle of to the circle give importance​
    10·1 answer
  • Who watches the show gravity falls, if you do, if you play the theme song for the first episode backwards you get a hiding messi
    11·2 answers
  • State the functions of the parts of the computer​
    11·2 answers
  • write the definition of a class clock. the class has no constructors and one instance variable of type int called hours.
    12·1 answer
  • To meet the requirement for the number of vdss on board, what must be true about pyrotechnic vdss?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!