Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- double Max(double a, double b, double c) {
- int max = 0;
- if (a > b && a > c)
- max = a;
- else if (b > a && b > c)
- max = b;
- else if (c > a && c > b)
- max = c;
- return max;
- }
- int main() {
- setlocale(LC_CTYPE, "");
- double a, b, c;
- cout << "Введiть 3 числа:" << endl;
- cin >> a >> b >> c;
- cout << "Найбiльше число = " << Max(a, b, c);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment