三个数最小值
#include <iostream>
using namespace std;
int Ssmallest(int q, int w, int e);
int a, b, c;
int d, e, f;
int smallest;
int main()
{
Ssmallest(d, e, f);
cout << smallest << endl;
return 0;
}
int Ssmallest(int q, int w, int e)
{
cin >> a >> b >> c;
if (a < b) {
if (a < c) {
smallest = a;
}
else {
smallest = c;
}
}
else {
if (b < c) {
smallest = b;
}
else
{
smallest = c;
}
return smallest;
}
}

浙公网安备 33010602011771号