include stdio h include stdlib h include math
Sign up to view full document!
SIGN UP
程式碼 #include <stdio. h> #include <stdlib. h> #include <math. h> int main() { int a, b, c; float D, x 1, x 2; printf("請輸入一元二次方程式的三個係數a, b, c:"); scanf("…………", …………); D = pow(b, 2)– 4*a*c; x 1 = …………; x 2 = …………; printf(" ax 2+bx+c=0 的兩個根為:……… ", …………); } system("PAUSE"); return 0;
- Slides: 17