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
14

3.21 LAB: Smallest number

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

Answer:

#include <iostream>

using namespace std;

int main(){

   int a, b, c;

   cout<<"Enter three integers: ";

   cin>>a>>b>>c;

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

       cout<<"Smallest: "<<a;    }

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

       cout<<"Smallest: "<<b;    }

   else{

       cout<<"Smallest: "<<c;    }

   return 0;

}

Explanation:

This line declares three integer variables a, b and c    

int a, b, c;

This line prompts the user for three integer inputs

   cout<<"Enter three integers: ";

This line gets the inputs

   cin>>a>>b>>c;

This checks if the first is the smallest

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

If yes, it prints the first as the smallest

       cout<<"Smallest: "<<a;    }

This checks if the second is the smallest

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

If yes, it prints the second as the smallest

       cout<<"Smallest: "<<b;    }

If the above conditions are not true, then the third number is printed as the smallest

<em>    else{</em>

<em>        cout<<"Smallest: "<<c;</em>

<em>    }</em>

<em />

You might be interested in
When you go to a website, your web browser requests a web page from:
lakkis [162]

Answer: web server

Explanation:

When you go to a website, your web browser requests a web page from the web server. For this to happen, the IP address for the webpage has to be identified first, tmaftee which the browser will request appropriate data from the web server.

Such request comes in form of data packet and takes place through HTTP and.utnhas all the necessary information that is needed by the web server for the delivery of the webpage data.

3 0
3 years ago
Consider the following method: public double doubleVal(double x) { return x *2; } The following code segment calls the method do
VashaNatasha [74]

Answer:

13.0

Explanation:

The method doubleVal() is created to accept a single parameter of type double.

It multiplies what ever the value of the parameter is and returns the resulting value.

In this question The method is called within this output statement System.out.println(doubleVal(val)); (Note that val had already been declared and assigned the value of 6.5)

The value 6.5 is doubled and outputed to the screen

8 0
3 years ago
In a system where Round Robin is used for CPU scheduling, the following is TRUE when a process cannot finish its computation dur
masha68 [24]

Answer:

B. The process will be terminated by the operating system.

Explanation:

When Round Robin is used for CPU scheduling, a time scheduler which is a component of the operating system is used in regulating the operation. A time limit is set for each of the processes to be run.

So, when a process fails to complete running before its time elapses, the time scheduler would log it off and return it to the queue. This queue is in a circular form and gives each of the processes a chance to run its course.

7 0
3 years ago
Does out-of-order makea machine's performance more or less
irina1246 [14]

Answer:

It would be correct to say that out-of-order makes a machine's performance more sensitive to branch prediction accuracy.

Explanation:

This can be explained as when a machine is out-of-order, in that state the  execution holds importance in prediction accuracy, any increase in these results in rate of prediction near about 25% for the single-issue operating in-order. This is due to the reason that some of the predictions are required for the global pattern history. Most recent outcomes are recorded in the register and for a 4-way machine which is out-of-order, accuracy is very poor as a result of the delay of the branch history for next prediction.

3 0
3 years ago
The security administrator for PLABS.com recommends using a host-based firewall for all servers and workstations. What can a hos
Zepler [3.9K]
<h2>Answer:</h2>

Option b, c, d are true.

The correct statements are as follows:

<h3>b. Can restrict a computer from receiving network traffic </h3><h3>c. Stops attackers when they are outside of the company's internal network </h3><h3>d. Stop a process or application from launching</h3><h3 /><h2>Explanation:</h2>

Firewall can be defined as a wall or checkpoint that checks each entity before it accesses to go inside or outside a network.

A firewall:

  • makes sure that the data inside a private network is safe by building a wall around it.
  • restricts the malicious data to go inside the network.
  • always ask about launching an application which is blocked by it due to suspicious activity.

A firewall can not:

  • prevent a system from being fingerprinted by port scans.
  • Disable an account.

<h3>I hope it will help you!</h3>
3 0
3 years ago
Read 2 more answers
Other questions:
  • Describe Mr. Digby, the principal. ​
    10·1 answer
  • What information medium is used to access information from the Internet in the form of HTML pages?
    12·1 answer
  • Does functionality provided by the app play an important role in a decision to
    13·1 answer
  • Hurry please
    12·1 answer
  • What is the first structure of a pascal program?
    5·1 answer
  • The Office ____ is a temporary storage area. Warehouse Clipboard Storehouse Gallery
    15·1 answer
  • In the early 1800's, a “computer" was not a machine, it was a person who did math
    8·2 answers
  • The illustration shows different types of text language.
    5·2 answers
  • Lesson 2.7 Code Practice #2
    13·1 answer
  • WHICH PROGRAMMING LANGUAGES ARE THE BEST AND COMPATIBLE FOR 3D PRINTERS?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!