Home
О нас
Products
Services
Регистрация
Войти
Поиск
ilyafrodo
@ilyafrodo
July 2022
2
12
Report
Болшее из трёх. Решите плиз с C++
Please enter comments
Please enter your name.
Please enter the correct email address.
Agree to
terms of service
You must agree before submitting.
Send
Answers & Comments
krenovut
#include <iostream>
using namespace std;
int main() {
int a1, a2, a3;
cin >> a1 >> a2 >> a3;
if ((a1>a2)&&(a1>a3)) a1-=5;
else if (a2>a3) a2-=5;
else a3-=5;
cout << a1 << ' ' << a2 << ' ' << a3 << '\n';
return 0;
}
Пример:
42 13 6
37 13 6
1 votes
Thanks 1
petyaGavrikov
Verified answer
#include <iostream>
#include <cmath>
int main() {
int n, n2, n3;
std::cin >> n >> n2 >> n3;
int maxN;
maxN = std::max(n, std::max(n2, n3));
if (maxN == n) {
std::cout << n-5 << ' ' << n2 << ' ' << n3 << '\n';
} if (maxN == n2) {
std::cout << n << ' ' << n2-5 << ' ' << n3 << '\n';
} if (maxN == n3) {
std::cout << n << ' ' << n2 << ' ' << n3-5 << '\n';
}
}
0 votes
Thanks 1
More Questions From This User
See All
ilyafrodo
July 2022 | 0 Ответы
napishite proceduru kotoraya prinimaet odin parametr naturalnoe chislo n i v
Answer
ilyafrodo
July 2022 | 0 Ответы
kakovy pokazaniya ampermetra i voltmetra v2 chemu ravno obshee pokazanie napryazhen
Answer
ilyafrodo
July 2022 | 0 Ответы
v ravnostoronnij treugolnik so storonoj 4 sm vpisana okruzhnost r napishite r
Answer
ilyafrodo
July 2022 | 0 Ответы
dva rezistora vklyucheny v cep tak kak pokazano na risunke vyberite pravilnoe9021eedea7aaff0d13590b7f68805ba6 69122
Answer
ilyafrodo
July 2022 | 0 Ответы
dva rezistora vklyucheny v cep tak kak pokazano na risunke vyberite pravilnoe73c363a67b205d2d060085c8866b7190 34150
Answer
ilyafrodo
July 2022 | 0 Ответы
pozhalujsta reshite eto zadaniead07a3b8794876362e7469cf5750442a 97021
Answer
ilyafrodo
July 2022 | 0 Ответы
reshite pozhalujsta etot test nagrada 74 balla
Answer
ilyafrodo
July 2022 | 0 Ответы
reshite plz dayu 60 ballov
Answer
ilyafrodo
November 2021 | 0 Ответы
pomogite plizzzzz himich 8 klass rabota po teme soedineniya himicheskih elementov
Answer
ilyafrodo
November 2021 | 0 Ответы
skolko grammov gidrooksida medi 2 obrazuetsya iz 32g sulfata medi i gidrooksi
Answer
рекомендуемые вопросы
rarrrrrrrr
August 2022 | 0 Ответы
o chem dolzhny pozabotitsya v pervuyu ochered vzroslye pri organizacionnom vyvoze n
danilarsentev
August 2022 | 0 Ответы
est dva stanka na kotoryh vypuskayut odinakovye zapchasti odin proizvodit a zapcha
myachina8
August 2022 | 0 Ответы
najti po grafiku otnoshenie v3v1 v otvetah napisano 9 no nuzhno reshenie
ydpmn7cn6w
August 2022 | 0 Ответы
Choose the correct preposition: 1.I am fond (out,of,from) literature. 2.where ar...
millermilena658
August 2022 | 0 Ответы
opredelite kak sozdavalas i kto sozdaval arabskoe gosudarstvo v kracii
MrZooM222
August 2022 | 0 Ответы
ch ajtmanov v rasskaze krasnoe yabloko ispolzuet metod rasskaz v rasskaze opi
timobila47
August 2022 | 0 Ответы
kakovo bylo naznachenie kazhdoj iz chastej vizantijskogo hrama pomogite pozhalujsta
ivanyyaremkiv
August 2022 | 0 Ответы
moment. 6....
pozhalujsta8b98a56c0152a07b8f4cbcd89aa2f01e 97513
sarvinozwakirjanova
August 2022 | 0 Ответы
pomogite pozhalusto pzha519d7eb8246a08ab0df06cc59e9dedb 6631
×
Report "Болшее из трёх. Решите плиз с C++..."
Your name
Email
Reason
-Select Reason-
Pornographic
Defamatory
Illegal/Unlawful
Spam
Other Terms Of Service Violation
File a copyright complaint
Description
Helpful Links
О нас
Политика конфиденциальности
Правила и условия
Copyright
Контакты
Helpful Social
Get monthly updates
Submit
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
using namespace std;
int main() {
int a1, a2, a3;
cin >> a1 >> a2 >> a3;
if ((a1>a2)&&(a1>a3)) a1-=5;
else if (a2>a3) a2-=5;
else a3-=5;
cout << a1 << ' ' << a2 << ' ' << a3 << '\n';
return 0;
}
Пример:
42 13 6
37 13 6
Verified answer
#include <iostream>#include <cmath>
int main() {
int n, n2, n3;
std::cin >> n >> n2 >> n3;
int maxN;
maxN = std::max(n, std::max(n2, n3));
if (maxN == n) {
std::cout << n-5 << ' ' << n2 << ' ' << n3 << '\n';
} if (maxN == n2) {
std::cout << n << ' ' << n2-5 << ' ' << n3 << '\n';
} if (maxN == n3) {
std::cout << n << ' ' << n2 << ' ' << n3-5 << '\n';
}
}