Calculate the following function: y = 2 / x, when x < 0; y = 0, when x = 0; y = 2x, when x > 0. Use scanf function to input the value of X and find the value of Y Please help me solve it!

Calculate the following function: y = 2 / x, when x < 0; y = 0, when x = 0; y = 2x, when x > 0. Use scanf function to input the value of X and find the value of Y Please help me solve it!

Maybe you don't understand the friend on the first floor. I'd like to give you a simple method, which is suitable for beginners like you # include void main() {float X; float y; printf ("please enter the value of X, x ="); scanf (%% F ", & X); if (x0) {y = 2.0 / X; printf (" y =...)