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
I am currently building my own PC is there any part I should put first? Or is it just whatever?
Dominik [7]

Basically, I had the same question when I got my PC! You can do any part you choose as long as you put it together in the right place.

Hope this helped you!

4 0
3 years ago
Read 2 more answers
When an online company runs a special promotion on swimsuits during the summer, they are taking advantage of the concept of
LenaWriter [7]
<span>When an online company runs a special promotion on swimsuits during the summer, they are taking advantage of the concept of p</span>eople’s urge to go for swimming to beat the summer heat and keep themselves cool. As a result, they are very likely to buy more swimsuits to go swimming. 
With a special promotion on swimsuits, people are likely to buy the company’s merchandise. This is because they can get what they want by paying a lesser amount than usual. In turn, the company is able to benefit by making more sales than its online and retail competitors.

6 0
3 years ago
Read 2 more answers
What is computer virus​
IRINA_888 [86]

Answer:

A type of malicious code or program written to alter the way a computer operates and is designed to spread from one computer to another.

Once a virus has successfully attached to a program, file, or document, the virus will lie dormant until circumstances cause the computer or device to execute its code. In order for a virus to infect your computer, you have to run the infected program, which in turn causes the virus code to be executed.

8 0
3 years ago
Read 2 more answers
How do you think your ability to work might be affected if you don’t magnify a document so that text is at a size for you to rea
max2010maxim [7]

Answer:

It will have a negative effect on the quality of your work for sure.

Without being able to properly and easily read the text, you will not be able to distinguish between symbols that are similar... like "," vs "." or ';' vs ":" or "m" vs "n" or "I" vs "i", and so on.

You might not be able to see where a sentence stops and you'll keep reading, mixing up sentences and wonder why this is in the same sentence.

If you're dealing with a language with accents (like French or Spanish for example), you will not be able to distinguish the accents ("ê" vs "ë" for example).

5 0
4 years ago
(--BRAINLIEST--)<br>Explain the types of secondary memory on the basis of data access.​
Nina [5.8K]

There are two types of secondary memories.

  1. RAM
  2. ROM

RAM:

  • RAM stands for random access memory .
  • It is expandable.
  • we can do multiple things in it.
  • Its erasable.

ROM

  • ROM stands for read only memory.
  • It is permanent .
  • We can only read in it.
  • Its permanent hence not removable.
8 0
3 years ago
Read 2 more answers
Other questions:
  • Write an overloaded constructor for the Table class that will take a single argument for the color of the table Write a set meth
    13·1 answer
  • Which topology enables only one person, at one time, to send data to others on the network?
    6·1 answer
  • To paste text with the same formatting as the document in which it is entered, select _____ from the Paste menu.
    12·1 answer
  • Mack has started with his first photographic assignment for a magazine. He has clicked around thirty images and uploaded them on
    10·1 answer
  • Cuales son mis fortalezas como estudiantes
    14·1 answer
  • A network administrator determines who may access network resources by assigning users
    10·1 answer
  • A digital presence created online by an individual or organization using a digital device is called a identity.
    7·1 answer
  • Hola buenas tardes, mi problema es el siguiente, en Word quiero alinear los párrafos por separado, pero, así lo sombree una line
    8·1 answer
  • What are tasks performed by pascaline?​
    8·1 answer
  • Determine which system you would recommend each of the customers use based on their provided user and system specs.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!