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
Butoxors [25]
3 years ago
10

Write a program to compute the maximum and minimum value of three numbers:

Computers and Technology
1 answer:
nexus9112 [7]3 years ago
7 0

Answer:

in javascript:

function compute(a, b, c){

let array = [a, b, c];

array.forEach((e,k) => {

if(e >= a && e >= b && e >= c){

console.log("maximum: " + e);

}  

if( e <= a && e <= b && e <= c){

console.log("minimum: " + e);

}

}

}

Explanation:

You might be interested in
Write the contrapositive of each of the following statements. Healthy plant growth follows from sufficient water. Increased avai
rusak2 [61]

Answer:

Healthy plant growth follows from sufficient water.

Contrapositive: If water is insufficient, then there isn't healthy plant growth

Increased availability of information is a necessary condition for further technological advances

Contrapositive: Absence of further technological advances implies decreased availability of information.

Errors were introduced only if there was a modification of the program.

Contrapositive: If there wasn't any modification of the program then error was not introduced into the program

Fuel savings implies good insulation or storm windows throughout.

Contrapositive: The absence of good insulation or storm windows throughout implies that there is no fuel savings.

Explanation:

A contrapositive statement is formed from a conditional statement as we can see from the answers above.

In a contrapositive statement, we just interchange the hypothesis and the conclusion of the inverse statement.

This implies that, when the converse of the statement is true, then the inverse of the statement is also logically true.

5 0
2 years ago
A researcher wants to do a web-based survey of college students to collect information about their sexual behavior and drug use.
Brilliant_brown [7]

Answer:

True.

Explanation:

An investigator would like to do an internet-based college student survey to gather data regarding their behavior as well as drug use. Even so, specific identifications are still not gathered and IP addresses might be available in the set of data. Damage threat must be assessed both by the magnitude (or severity) and the likelihood (or likelihood) of the hurt.

7 0
3 years ago
cout &lt;&lt; "Part 1" &lt;&lt; endl; // Part 1 // Enter the statement to print the numbers in index 4 and index 9 // put a spac
Margarita [4]

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;

}

3 0
2 years ago
Write the following arithmetic expression as a valid C arithmetic expression: x = x + number
otez555 [7]

Answer:

x = x + number

x+=number

Explanation:

Given

x = x + number

Required

Write an equivalent expression in C

The given expression uses + and + is represented as + in C

So: The equivalent expression is

x = x + number

However, C supports compound assignment operators

So:

x = x + number

can be rewritten as

x+=number

3 0
3 years ago
Based on the unit content and your own ideas, how would you define a video game in your own words? What separates a regular vide
lara31 [8.8K]

Answer:

A video game would be a series of steps to produce or outcome / end in the form of controller a character or the how the game can be played and being able to play it at some level, but a good game would have multiple questions and a hard difficulty maybe even a customizable section for your character or object. In other words a Video game would be a series of steps to produce a outcome from controlling a character and a Good video game would be the same but added a level of difficulty and harder mechanics into the game.

Explanation:

Hope this helped :)

3 0
3 years ago
Other questions:
  • You're trying to decide which disk technology to use on your new server. the server will be in heavy use around the clock every
    10·1 answer
  • W jakim celu powstawały pieśni żołnierskie i partyzanckie?
    10·1 answer
  • Before using the data type string, the program must include the header file ____.
    6·1 answer
  • How can you tell that a website is valid and reliable
    7·2 answers
  • 6) RAM, 5 main memory<br>which storage conbe used<br>as permanent storage<br>Rom<br>a) R<br>)​
    8·2 answers
  • New Jersey and New York have the highest state taxes in the United States. They also have high ratios of people moving out compa
    13·1 answer
  • What type of engineer is interested in designing, developing, and building different machines, devices, and tools? A.aerospace
    8·2 answers
  • You have this code in your program.
    7·1 answer
  • What are logic gates ?​
    10·2 answers
  • A social service agency hires accenture to improve training and experiences for caseworkers. What is one way accenture can use v
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!