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 min. Assume that all the variables have already been declared and that x, y, and z have been assigned values.

Answers

Answer 1
Answer:

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


Related Questions

In C language.int z,x=5, y=-10, a=4, b=2 z=x++ - --y * b / a what number will z in the sample contain? a. 5 b. 6 c. 10 d. 11
A rectangular range of cells with headings to describe the cells' contents is referred to as a A. complex formula. B. sparkline. C. table. D. bar chart.
A display that is thin, flexible, light, and easy to read in all types of light is a(n) _____. touch screen computer. electronic notebook. Liquid Crystal Display. Electronic Paper Display.
What is the operation of an earth leakage tester
Which of the following Web sites would be MOST credible?a. a site associated with a local universityb. an encyclopedia site with many contributorsc. a site run by a small, obscure publishing housed. a private site that contains a lot of information

Which company was the maker of the number one software suite in the world in the 1990s? Sun Microsystems Google Micropro Microsoft

Answers

The answer is the last one, Microsoft.
Microsoft, Lotus, Borland and WordPerfect were the major contenders in a 1990s battle for supremacy in the office suite market that Microsoft Office ultimately won.

If i throw papers in the dryer to help them dry faster could that mess up the dryer?

Answers

If they papers get caught in the dryer, i recommend a fan, or a hair dryer

Moore's Law postulates that:This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this task are A to H and alt 1 to alt 9. A a paradigm shift will take place in the technical sciences every two years. B the number of transistors per square inch on integrated circuits will double every two years. C the rate at which new ideas spread through cultures depends on distribution channels. D the members of a given population will usually adopt or accept a new product or innovation.

Answers

Answer:

B. the number of transistors per square inch on integrated circuits will double every two years.

Explanation:

The law has been staying true to its postulation as it has been used in so many fields and for every measure of the capabilities of digital electronic devices, including computer processing speed and memory capacity.

It has led to a paradigm shift , technology adoption life cycle and diffusion innovation theory.

In a real machine, the AMA is always the same asgreater thanless than the IMA

Answers

In a real machine, the AMA is always less than the IMA. The Actual Mechanical Advantage (AMA) will always be lower than the Ideal Mechanical Advantage (IMA) because of friction loss. Which can't be measured through input and output of forces in the machines.

7) Which of the following factors determines the structure, features, and functions of an information system used in a company? A) the competitive strategy B) the value of its brands C) the size of the company D) the technology used by competitors

Answers

The factor which determines the structure as well as features of an information system used throughout an organization is referred to as Competitive Strategy.

Competitive strategy

The competitive strategy of a company is concerned with how to compete in the business sectors wherein the company participates as well as operations.

In other terms, competitive strategy defines how well a company expects to develop as well as sustain a competitive edge over competitors.

Thus the above answer i.e., "option A" is correct.

Find out more information about competitive strategy here:

brainly.com/question/5042589

Answer:

The correct option is A: Competitive Strategy

Explanation:

The competitive strategy of an organization is the factor that determines the function, feature and structure of the information system that will be used. The value of its brand has nothing to do with the form of info system to be used, neither is the size of the company a determinant factor of the information system to be used. You cannot determine your own information system structure and function by that of a competitor. Hence the correct option is A. In every organization, the information system has great impact on competitive advantage in differentiation or cost.

A web page without a bibliography, or sources, is an indicator of an unreliable site. Please select the best answer from the choices provideda. True
b. False

Answers

Answer:

True indeed

Explanation: