int main() { int x, y, z; std::cin >> x >> y >> z; void (*ptr)(int *x, int *y, int *z); ptr = sort; (*ptr)(&x, &y, &z); std::cout << x << " " << y << " " << z << std::endl; system("pause"); return 0; }
inline void sort(int *a, int *b, int *c) { if (*b < *a) std::swap(*a, *b); if (*c < *a) std::swap(*a, *c); if (*c < *b) std::swap(*b, *c); }
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota
Оформи подписку