Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int a, b, c;
- cin >> a >> b >> c;
- int pomosna = 0;
- if(a >= 5) {
- pomosna += 5;
- a -= 5;
- }
- else {
- pomosna += a;
- a = 0;
- }
- if(b >= 5) {
- pomosna += 5;
- b -= 5;
- }
- else {
- pomosna += b;
- b = 0;
- }
- if(c >= 5) {
- pomosna += 5;
- c -= 5;
- }
- else {
- pomosna += c;
- c = 0;
- }
- if(abs(a - b) <= pomosna or abs(a - c) <= pomosna or abs(b - c) <= pomosna) {
- cout << "DA" << endl;
- }
- else {
- cout << "NE" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement