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
rodikova [14]
3 years ago
8

Write a program whose inputs are three integers, and whose outputs are the largest of the three values and the smallest of the t

hree values. If the input is 7 15 3, the output is: largest: 15 smallest: 3 Your program should define and call two functions: Function LargestNumber(integer num1, integer num2, integer num3) returns integer largestNum Function SmallestNumber(integer num1, integer num2, integer num3) returns integer smallestNum
Computers and Technology
1 answer:
Monica [59]3 years ago
7 0

Answer:

int SmallestNumber(int num1, int num2, int num3){

int smallest;

if (num1 >num2){

smallest=num2;

}

else {

smallest=num1;

}

if(smallest <num3){

smallest=num3;

}

}

int LargestNumber(int num1, int num2, int num3){

int largest;

if (num1 <num2){

largest=num2;

}

else {

largest=num1;

}

if(largest>num3){

largest=num3;

}

}

void main(){

int num1,num2,num3;

printf("enter values");

scanf("%d%d%d",&num1,&num2,&num3);

int smallest=SmallestNumber(num1,num2,num3);

int largest=LargestNumber(num1,num2,num3);

}

Explanation:

we are comparing first two numbers and finding largest among those. After getting largest comparing that with remaining if it is greater then it will be largest of three. Same logic applicable to smallest also

You might be interested in
David needs to create a password. He uses "rtjjkliusfvwr." Which of the following best explains the weakness in his password?
Darina [25.2K]
I would say because it is hard to remember. Unless each one of those stands for a world, kind of like an acronym, then good luck remembering it!
3 0
3 years ago
Read 2 more answers
Which of the following is not a type of computer network?
vagabundo [1.1K]
B. Metropolitan area network
7 0
3 years ago
What is a utility application that monitors the network path of packet data sent to a remote computer?
stepladder [879]

Answer:

"Traceroute " is the  correct answer.

Explanation:

The traceroute commands in the networking that traces the network path The  traceroute is also displaying the information about the pack delay that is sent over the internet."Traceroute is also known as tracepath it means it calculated the path between the packets in the network. Traceroute takes the one IP address of the computer machine and taking another Ip address to calculate the path between the packets.

Traceroute Is a type of utility application that monitors the network between the packet that is sent into a remote computer.

7 0
3 years ago
Is The speed of microprocessor measured by Mega Bytes​
DiKsa [7]

Answer:

El microprocesador (o simplemente procesador) es el circuito integrado central más complejo de un sistema informático; a modo de ilustración, se le suele llamar por analogía el «cerebro» de un ordenador.1​

Es el encargado de ejecutar todos los programas, desde el sistema operativo hasta las aplicaciones de usuario; solo ejecuta instrucciones en lenguaje binario, realizando operaciones aritméticas y lógicas simples, tales como sumar, restar, multiplicar, dividir, las lógicas binarias y accesos a memoria.

Puede contener una o más unidades centrales de procesamiento (CPU) constituidas, esencialmente, por registros, una unidad de control, una unidad aritmético lógica (ALU) y una unidad de cálculo en coma flotante (conocida antiguamente como «coprocesador matemático»).

El microprocesador está conectado generalmente mediante un zócalo específico de la placa base de la computadora; normalmente para su correcto y estable funcionamiento, se le incorpora un sistema de refrigeración que consta de un disipador de calor, fabricado de algún material de alta conductividad térmica, como cobre o aluminio, y de uno o más ventiladores que eliminan el exceso del calor absorbido por el disipador. Entre el disipador y la cápsula del microprocesador usualmente se coloca pasta térmica para mejorar la conductividad del calor. Existen otros métodos más eficaces, como la refrigeración líquida o el uso de células peltier para refrigeración extrema, pero estas técnicas se utilizan casi exclusivamente para aplicaciones especiales, tales como en las prácticas de overclocking.

La medición del rendimiento de un microprocesador es una tarea compleja, dado que existen diferentes tipos de "cargas" que pueden ser procesadas con diferente efectividad por procesadores de la misma gama. Una métrica del rendimiento es la frecuencia de reloj que permite comparar procesadores con núcleos de la misma familia, siendo este un indicador muy limitado dada la gran variedad de diseños con los cuales se comercializan los procesadores de una misma marca y referencia. Un sistema informático de alto rendimiento puede estar equipado con varios microprocesadores trabajando en paralelo, y un microprocesador puede, a su vez, estar constituido por varios núcleos físicos o lógicos. Un núcleo físico se refiere a una porción interna del microprocesador casi-independiente que realiza todas las actividades de una CPU solitaria, un núcleo lógico es la simulación de un núcleo físico a fin de repartir de manera más eficiente el procesamiento. Existe una tendencia de integrar el mayor número de elementos dentro del propio procesador, aumentando así la eficiencia energética y la miniaturización. Entre los elementos integrados están las unidades de punto flotante, controladores de la memoria RAM, controladores de buses y procesadores dedicados de vídeo.

Explanation:

6 0
3 years ago
(1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the arr
Mashutka [201]

Answer:

weights = []

total = 0

max = 0

for i in range(5):

   weight = float(input("Enter weight " + str(i+1) + ": "))

   weights.append(weight)

   total += weights[i]

   if weights[i] > max:

       max = weights[i]

average = total / 5

print("Your entered: " + str(weights))

print("Total weight: " + str(total))

print("Average weight: " + str(average))

print("Max weight: " + str(max))

Explanation:

Initialize the variables

Create a for loop that iterates 5 times

Get the values from the user

Put them inside the array

Calculate the total by adding each value to the total

Calculate the max value by comparing each value

When the loop is done, find the average - divide the total by 5

Print the results

6 0
3 years ago
Other questions:
  • A coffee shop is considering accepting orders and payments through their phone app and have decided to use public key encryption
    15·1 answer
  • A ________ is a collection of forms, reports, queries, and programs that serves as an intermediary between users and database da
    6·1 answer
  • A file name extension provides what information about a file?
    10·2 answers
  • You are utilizing BitLocker Drive Encryption, and are attempting to update Windows Server 2016. What must be done so that the up
    14·1 answer
  • Which view in the View tab of the ribbon is the easiest place to add a header or a footer? Normal view Custom Views Page Layout
    5·2 answers
  • how do I delete my brainly account, my child signed up for it and nothing has been paid but I do not want the account to exist a
    7·2 answers
  • Question 1 of 10 Chase lives in Oregon but works for a company that is located in Florida. What business trend is this an exampl
    11·2 answers
  • The function of while loop is
    14·1 answer
  • 12.2 Sort an array in ascending order Write a program that gets a list of integers from input, and outputs the integers in ascen
    10·1 answer
  • How to realize dynamic balance of planar closed-chain leg mechanism?​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!