三个数最小值

#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;
}

}

posted @ 2021-07-01 15:26  江南王小帅  阅读(164)  评论(0)    收藏  举报