Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Find integer values of functions of integer values
#include <stdio.h> #include <math.h> // mod'd from R. E.'s code double pow(double x, double y); int main(void) { double lower = -1000; double upper = 1000; double y; for (double x = lower; x <= upper; x+=1) { if ((pow(x,2) - 8) == 0) continue; y = (pow(x,3) -13*x + 6) / (pow(x,2)-8); if (y == (int)y) printf("\n%d/%d", (int)x,(int)y); } printf("\n"); return 0; }
run
|
edit
|
history
|
help
0
This shows a way to print the integer values of functions of integer values.
by bradley_lee_r@sbcglobal.net, 1 years ago
link text
by bradley_lee_r@sbcglobal.net, 1 years ago
Please
log in
to post a comment.
problema5propuestos2014/11/05
Look at the bleeping warnings
matice
tiskunti retezcu a zmena pismenke z malych an velke
struktura vzalenost
hrátky s ukazately ++ bonusy ++ profi swap
PÅ™estupný rok
MSVC_example_evaluation_order_multi_assignments
bignum test
BPC UDP pr3 cv10
stackse - search stackoverflow differently
This shows a way to print the integer values of functions of integer values.
by bradley_lee_r@sbcglobal.net, 1 years agolink text
by bradley_lee_r@sbcglobal.net, 1 years agoPlease log in to post a comment.