Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - ABC plastic surgery
ABC plastic surgery
# include & ltiostream & gt// New standard iostream

Use namespace std// Use

int main()

{

int a,b,c; //Explain the plastic variable abc

int f(int x,int y,int z); //Function prototype description

CIN & gt; & gta & gt& gtb & gt& gtc; //Enter 3 integers into abc from the keyboard.

c=f(a,b,c); //Call the function with the value of abc, and the function returns the value to C.

Cout & lt& ltc<& ltendl// outputs the value of C.

Returns 0; //At the end of the program, return 0 to the system environment, indicating that the operation is successful.

}

int f(int x,int y,int z)

{

int m; //local variable m, (local variable xyz will get the parameter value given when calling the function)

if(x & lt; y)m = x; //x is less than y, and m takes x value.

else m = y; //x is not less than y, and m takes y value.

if(z & lt; m)m = z; //z is less than m, and m takes z value.

Return (m); //After the above three sentences, m is the minimum value of x, y and z, ending the function and returning the value of m..

}

//The original program is to input three integers, and the program outputs the smallest number after judgment.