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
lubasha [3.4K]
3 years ago
13

Given the int variables x, y, and z, write a fragment of code that assigns the smallest of x, y, and z to another int variable m

in. Assume that all the variables have already been declared and that x, y, and z have been assigned values.
Computers and Technology
1 answer:
Marysya12 [62]3 years ago
6 0

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

   // variables

   int x=5,y=2,z=9;

   int min;

   // find the smallest value and assign to min

   // if x is smallest

   if(x < y && x < z)

   // assign x to min

    min=x;

     // if y is smallest

else if(y < z)

 // assign y to min

    min=y;

// if z is smallest

else

 // assign z to min

    min=z;

// print the smallest

cout<<"smallest value is:"<<min<<endl;

return 0;

}

Explanation:

Declare and initialize variables x=5,y=2 and z=9.Then check if x is less than y and x is less than z, assign value of x to variable "min" .Else if value of y is less than value of z then smallest value is y, assign value of y to "min".Else z will be the smallest value, assign its value to "min".

Output:

smallest value is:2

You might be interested in
For your biology class, you have taken a number of measurements for a plant growth experiment. You wish to create a chart that s
Naya [18.7K]
Calc or Excel is the application best suited for this effort.
8 0
3 years ago
Read 2 more answers
What is episodic memory? knowledge about words, concepts, and language-based knowledge and facts information about events we hav
tankabanditka [31]

Answer:

<em>information about events we have personally experienced</em>

Explanation:

Episodic memory is <em>the actual memory of a particular event that a person has, so it will be different from the recall of the same encounter or experience by someone else.</em>

Often, episodic memory is mistaken with autobiographical memory, and while autobiographical memory includes episodic memory, it also depends on semantic memory.

<em>For instance, you might know the city you were born in and the date, though you have no particular birth memories.</em>

3 0
3 years ago
I'm curious why I would need to know this on a school learning site.
zhannawk [14.2K]
no idea either lol, I mean school forces you to learn





..
4 0
3 years ago
What character separates the file extension and the filename?
PtichkaEL [24]
A period, Filenamehere.png or .pdf or any other file extension
5 0
2 years ago
Read 2 more answers
________ software provides a means of sharing, distributing, and searching through documents by converting them into a format th
Alexus [3.1K]
The answer to this question is Document Management Software.

Document Management Software or DMS is a computer system or software that is used to store, share, manage, and distribute documents by converting paper based documents into an electronic image that can be viewed by any user. The converting of documents is through the use of a scanner, and the document management software will enable the users to manage the electronic documents or data.
3 0
3 years ago
Other questions:
  • What kind of voltage do solar cells generate? Solar cells produce ______ voltage which is not usable by most household appliance
    15·1 answer
  • "under the control panel, what console contains print management, computer management, and event viewer?"
    11·1 answer
  • Why Unicode is the standard way of converting binary to text?
    8·1 answer
  • The next generation ip version and successor to ipv4 is called what? ipv5 ipv6 iana ssl
    13·1 answer
  • Which of the following keywords is used to remove a row in a table? (Points : 2) DROP
    11·1 answer
  • Shane is working on a new project for the sales department. The company wants a way to allow the sales force to print orders at
    5·1 answer
  • Explain to Alana why she might not want to blast her boss on social media just yet.<br>​
    6·1 answer
  • Jonah wants to type an assignment using Word. Arrange the steps he needs to follow in the correct order.?
    13·1 answer
  • An animation of a person standing with their arms extended out to their sides. There are 3 dimensional boxes around the torso of
    5·1 answer
  • Hi everyone can anyone tell me how to align the photo the right in code.org
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!