4 ms·
I haven't read it fully yet, but I will write that TPK algorithm in some language(s). Post here if you have some (! OR ?)
by Torwald 6y ago
I haven't read it fully yet, but I will write that TPK algorithm in some language(s). Post here if you have some (! OR ?)
- shadowofneptune 6y agoThis appears to be what it would be in C or C++. float f(float t) { return sqrt(abs(t)) + 5 * pow(t, 3); } void tpk(void) { int i; float y, a[11]; for (int i = 0; i < 11; ++i) scanf("%f", &a[i]); for (int i = 11; i > 0; --i) { y = f(a[i]); if (y > 400) printf("%d TOO LARGE", i); else printf("%d %f", i, y); } }
- svat 6y agohttps://rosettacode.org/wiki/Trabb_Pardo%E2%80%93Knuth_algorithm https://rosettacode.org/wiki/Trabb_Pardo%E2%80%93Knuth_algor...
- Torwald 6y agoThanks for the link!! (Yeah, I am not going to look it up before I did my own…)