Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Fractions n/d that obey (n+5)/(d+2)=3n/d
#include <stdio.h> // given a fraction that obeys // // (n+5)/(d+2) = 3 * n/d // // print out all solutions int main(void) { double lower = -100; double upper = 100; double d; for (double n = lower; n <= upper; n+=1) { if (n == 0) continue; d = 6*n/(5-2*n); if (d == (int)d) printf("\n%d/%d", (int)n,(int)d); } printf("\n"); return 0; }
run
|
edit
|
history
|
help
0
given a fraction that obeys
(n+5)/(d+2) = 3 * n/d
print out all solutions
by bradley_lee_r@sbcglobal.net, 2 years ago
Please
log in
to post a comment.
MSVC_example_evaluation_order_multi_assignments
TQueue
crackme
funkce vzdálenost
TVector
BPC cv5_kvadraticka - final
Ukazatele PR4
inicializace struktury
BPC cv 5_Test
kvadratická rovnice
given a fraction that obeys
(n+5)/(d+2) = 3 * n/d
print out all solutions
by bradley_lee_r@sbcglobal.net, 2 years agoPlease log in to post a comment.