Given the integer variables x , y , and z , write a fragment of code that assigns the smallest of x , y , and z to another integer variable named min .

Assume that all the variables have already been declared and that x , y , and z have been assigned values ).

I have no clue what to do here. Someone please help. thanks

first off it would be logical to get these varibles written???

#include <iostream>

using namespace std;
void function1(int x, int y , int z); // passing 3 pararmeters by value
int main()
{

int x = 0, y = 1, z = 2
function(x,y,z,) //function caller which doesnt return anything
}


void function1(int x, int y , int z)
{
int min
// a series of if statements to test which ones are bigger than the others....
cout << min << endl;

}

I just woke up thats all I can recall from my head at this very moment. If I find that you need more help later I'll be more than willing to jumble about with some code and post it up.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.