#include <iostream>
using namespace std;
int main()
{
double x, y, b;
int T = 10;
int c;
int i, j;
double deltaT[7];
for (int c = 0; c < 7; c++)
{
y = 0.01 * (rand() % 101);
x = rand() % 1 + y;
deltaT[c] = T - x;
}
for (int c = 0; c < 6; c++)
{
for (int j = c + 1; j < 7; j++) {
if (deltaT[c] < deltaT[j]) {
x = deltaT[c];
deltaT[c] = deltaT[j];
deltaT[j] = x;
}
}
}
for (int c = 0; c < 7; c++) {
cout << deltaT[c] << endl;
}
system("pause");
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpCnsKCWRvdWJsZSB4LCB5LCBiOwoJaW50IFQgPSAxMDsKCWludCBjOwoJaW50IGksIGo7Cglkb3VibGUgZGVsdGFUWzddOwoJZm9yIChpbnQgYyA9IDA7IGMgPCA3OyBjKyspCgl7CgkJeSA9IDAuMDEgKiAocmFuZCgpICUgMTAxKTsKCQl4ID0gcmFuZCgpICUgMSArIHk7CgkJZGVsdGFUW2NdID0gVCAtIHg7Cgl9CgoJCWZvciAoaW50IGMgPSAwOyBjIDwgNjsgYysrKQoJCXsKCQkJZm9yIChpbnQgaiA9IGMgKyAxOyBqIDwgNzsgaisrKSB7CgkJCWlmIChkZWx0YVRbY10gPCBkZWx0YVRbal0pIHsKCQkJCXggPSBkZWx0YVRbY107CgkJCQlkZWx0YVRbY10gPSBkZWx0YVRbal07CgkJCQlkZWx0YVRbal0gPSB4OwoJCQl9CgkJCX0KCQl9CgkKCQlmb3IgKGludCBjID0gMDsgYyA8IDc7IGMrKykgewoJCWNvdXQgPDwgZGVsdGFUW2NdIDw8IGVuZGw7Cgl9CgoJc3lzdGVtKCJwYXVzZSIpOwoJcmV0dXJuIDA7Cn0=