gosuodin

Min

Jun 6th, 2016
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int Min(int &a, int &b, int &c) {
  4. if ((a < b) && (a < c)) {
  5. return a;
  6. }
  7. else
  8. {
  9. if ((b < a) && (b < c))
  10. {
  11. return b;
  12. }
  13. else {
  14. return c;
  15. }
  16. }
  17. }
  18.  
  19.  
  20. void main()
  21. {
  22. int a, b, c;
  23. cout << " nhap 3 so a b c :";
  24. cin >> a >> b >> c;
  25. cout << "Min la :";
  26. cout << Max(a, b, c);
  27. system("pause");
  28. }
Add Comment
Please, Sign In to add comment