Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Quadratic Formula
//gcc 5.4.0 #include <stdio.h> int main(void) { //infix notation is 3+2 //prefix notation is (+2 3) //postfix notation (3 2 +) // y = ax**2+bx+c //Compute quadratic formula // [-b+/-squareroot(b**2-4ac)]/2*a double math = 3+5*6; double math1 = 3-2; double a=1; double b=0; double c=-1; double discrim=powf(b,2)-4*a*c; double x=sqrt(discrim); double solution1=(-b+x)/(2*a); double solution2=(-b-x)/(2*a); printf("solution1:%f\n", solution1); printf("solution1:%f\n", solution2); printf("math is %lf\n", math); printf("math1 is %lf\n", math1); return 0; }
run
|
edit
|
history
|
help
0
C_141112_Perfectos
CO_assign_q4
Smartprix coding
CreverseInt
MATRIZ DE CADENAS
A_141124arrayRepetidos
Project 3 part 2 Book v10.2
A_141121_factorial01
18BCE2182 ASSESS_1 Q1-4
json string formatter