#include <stdio.h>
void compareNumbers(int a, int b, int c) {
// Check if all numbers are the same
if (a == b && b == c) {
return;
}
// Find the largest and smallest numbers
int max_num = a;
int min_num = a;
if (b > max_num) max_num = b;
if (c > max_num) max_num = c;
if (b < min_num) min_num = b;
if (c < min_num) min_num = c;
// Check if there are two largest numbers
if ((a == max_num && b == max_num) ||
(a == max_num && c == max_num) ||
(b == max_num && c == max_num)) {
printf("Isti maksimalni vnesovi\n"); }
// Check if there are two smallest numbers
if ((a == min_num && b == min_num) ||
(a == min_num && c == min_num) ||
(b == min_num && c == min_num)) {
printf("Isti minimalni vnesovi\n"); }
// Check if the difference between the smallest and largest is greater than 5
if (max_num - min_num > 5) {
printf("Dovolno odaleceni vnesovi\n"); }
}
int main() {
int a, b, c;
// Input three integers
printf("Vnesi prvi cel broj: ");
printf("Vnesi vtori cel broj: ");
printf("Vnesi tret cel broj: ");
// Compare the numbers
compareNumbers(a, b, c);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGNvbXBhcmVOdW1iZXJzKGludCBhLCBpbnQgYiwgaW50IGMpIHsKICAgIC8vIENoZWNrIGlmIGFsbCBudW1iZXJzIGFyZSB0aGUgc2FtZQogICAgaWYgKGEgPT0gYiAmJiBiID09IGMpIHsKICAgICAgICBwcmludGYoIklzdGkgc2UgYnJvZXZpdGVcbiIpOwogICAgICAgIHJldHVybjsKICAgIH0KCiAgICAvLyBGaW5kIHRoZSBsYXJnZXN0IGFuZCBzbWFsbGVzdCBudW1iZXJzCiAgICBpbnQgbWF4X251bSA9IGE7CiAgICBpbnQgbWluX251bSA9IGE7CgogICAgaWYgKGIgPiBtYXhfbnVtKSBtYXhfbnVtID0gYjsKICAgIGlmIChjID4gbWF4X251bSkgbWF4X251bSA9IGM7CgogICAgaWYgKGIgPCBtaW5fbnVtKSBtaW5fbnVtID0gYjsKICAgIGlmIChjIDwgbWluX251bSkgbWluX251bSA9IGM7CgogICAgLy8gQ2hlY2sgaWYgdGhlcmUgYXJlIHR3byBsYXJnZXN0IG51bWJlcnMKICAgIGlmICgoYSA9PSBtYXhfbnVtICYmIGIgPT0gbWF4X251bSkgfHwgCiAgICAgICAgKGEgPT0gbWF4X251bSAmJiBjID09IG1heF9udW0pIHx8IAogICAgICAgIChiID09IG1heF9udW0gJiYgYyA9PSBtYXhfbnVtKSkgewogICAgICAgIHByaW50ZigiSXN0aSBtYWtzaW1hbG5pIHZuZXNvdmlcbiIpOwogICAgfQoKICAgIC8vIENoZWNrIGlmIHRoZXJlIGFyZSB0d28gc21hbGxlc3QgbnVtYmVycwogICAgaWYgKChhID09IG1pbl9udW0gJiYgYiA9PSBtaW5fbnVtKSB8fCAKICAgICAgICAoYSA9PSBtaW5fbnVtICYmIGMgPT0gbWluX251bSkgfHwgCiAgICAgICAgKGIgPT0gbWluX251bSAmJiBjID09IG1pbl9udW0pKSB7CiAgICAgICAgcHJpbnRmKCJJc3RpIG1pbmltYWxuaSB2bmVzb3ZpXG4iKTsKICAgIH0KCiAgICAvLyBDaGVjayBpZiB0aGUgZGlmZmVyZW5jZSBiZXR3ZWVuIHRoZSBzbWFsbGVzdCBhbmQgbGFyZ2VzdCBpcyBncmVhdGVyIHRoYW4gNQogICAgaWYgKG1heF9udW0gLSBtaW5fbnVtID4gNSkgewogICAgICAgIHByaW50ZigiRG92b2xubyBvZGFsZWNlbmkgdm5lc292aVxuIik7CiAgICB9Cn0KCmludCBtYWluKCkgewogICAgaW50IGEsIGIsIGM7CgogICAgLy8gSW5wdXQgdGhyZWUgaW50ZWdlcnMKICAgIHByaW50ZigiVm5lc2kgcHJ2aSBjZWwgYnJvajogIik7CiAgICBzY2FuZigiJWQiLCAmYSk7CgogICAgcHJpbnRmKCJWbmVzaSB2dG9yaSBjZWwgYnJvajogIik7CiAgICBzY2FuZigiJWQiLCAmYik7CgogICAgcHJpbnRmKCJWbmVzaSB0cmV0IGNlbCBicm9qOiAiKTsKICAgIHNjYW5mKCIlZCIsICZjKTsKCiAgICAvLyBDb21wYXJlIHRoZSBudW1iZXJzCiAgICBjb21wYXJlTnVtYmVycyhhLCBiLCBjKTsKCiAgICByZXR1cm4gMDsKfQ==