|
|
|
|
A & B & C & D are close |
|
|
|
|
#include <iostream> void foo(int value) { using std::cout; int a=1, b=2, c=4, d=3, e=1; if (a - value <= 5 && b - value <= 5 && c - value <= 5 && d - value <= 5 && e - value <= 5) { cout << "A & B & C & D & E are close\n"; } if (a - value <= 5 && b - value <= 5 && c - value <= 5 && d - value <= 5) { cout << "A & B & C & D are close\n"; } if (a - value <= 5 && b - value <= 5 && c - value <= 5 && e - value <= 5) { cout << "A & B & C & E are close\n"; } if (a - value <= 5 && b - value <= 5 && c - value <= 5) { cout << "A & B & C are close\n"; } if (a - value <= 5 && b - value <= 5 && d - value <= 5 && e - value <= 5) { cout << "A & B & D & E are close\n"; } if (a - value <= 5 && b - value <= 5 && d - value <= 5) { cout << "A & B & D are close\n"; } if (a - value <= 5 && b - value <= 5 && e - value <= 5) { cout << "A & B & E are close\n"; } if (a - value <= 5 && b - value <= 5) { cout << "A & B are close\n"; } if (a - value <= 5 && c - value <= 5 && d - value <= 5 && e - value <= 5) { cout << "A & C & D & E are close\n"; } if (a - value <= 5 && c - value <= 5 && d - value <= 5) { cout << "A & C & D are close\n"; } if (a - value <= 5 && c - value <= 5 && e - value <= 5) { cout << "A & C & E are close\n"; } if (a - value <= 5 && c - value <= 5) { cout << "A & C are close\n"; } if (a - value <= 5 && d - value <= 5 && e - value <= 5) { cout << "A & D & E are close\n"; } if (a - value <= 5 && d - value <= 5) { cout << "A & D are close\n"; } if (a - value <= 5 && e - value <= 5) { cout << "A & E are close\n"; } if (a - value <= 5) { cout << "A is close\n"; } if (b - value <= 5 && c - value <= 5 && d - value <= 5 && e - value <= 5) { cout << "B & C & D & E are close\n"; } if (b - value <= 5 && c - value <= 5 && d - value <= 5) { cout << "B & C & D are close\n"; } if (b - value <= 5 && c - value <= 5 && e - value <= 5) { cout << "B & C & E are close\n"; } if (b - value <= 5 && c - value <= 5) { cout << "B & C are close\n"; } if (b - value <= 5 && d - value <= 5 && e - value <= 5) { cout << "B & D & E are close\n"; } if (b - value <= 5 && d - value <= 5) { cout << "B & D are close\n"; } if (b - value <= 5 && e - value <= 5) { cout << "B & E are close\n"; } if (b - value <= 5) { cout << "B is close\n"; } if (c - value <= 5 && d - value <= 5 && e - value <= 5) { cout << "C & D & E are close\n"; } if (c - value <= 5 && d - value <= 5) { cout << "C & D are close\n"; } if (c - value <= 5 && e - value <= 5) { cout << "C & E are close\n"; } if (c - value <= 5) { cout << "C is close\n"; } if (d - value <= 5 && e - value <= 5) { cout << "D & E are close\n"; } if (d - value <= 5) { cout << "D is close\n"; } if (e - value <= 5) { cout << "E is close\n"; } } int main() { foo(2); } |
A & B & C & D & E are close A & B & C & D are close A & B & C & E are close A & B & C are close A & B & D & E are close A & B & D are close A & B & E are close A & B are close A & C & D & E are close A & C & D are close A & C & E are close A & C are close A & D & E are close A & D are close A & E are close A is close B & C & D & E are close B & C & D are close B & C & E are close B & C are close B & D & E are close B & D are close B & E are close B is close C & D & E are close C & D are close C & E are close C is close D & E are close D is close E is close |
|
|