help with c# program
tmh88
Pittsburgh / Athens, OH
Hey guys I'm working on a C# program that gets the X and Y input from a user, and then determines which quadrant the x,y is in. It needs to determine the position of the point as a function of the two paramaters, x and y. Heres what I have so far. Can you guys give me some suggestions how to fix the errors? thanks
i realize that I need to call the function from below, but I cant think of any simple ways to do it.
and btw #include <stdio.h isnt showing up in the code down below for some reason, but its there, just trust me on it.
when I compile it I get the error l
ab4.c:25: error: expected identifier or '(' before '{' token
i realize that I need to call the function from below, but I cant think of any simple ways to do it.
and btw #include <stdio.h isnt showing up in the code down below for some reason, but its there, just trust me on it.
#include <stdio.h> int main (void) { double x,y; printf("Enter the X value"); scanf("%lf", &x); printf("Enter the y value"); scanf("%lf", &y); return (0); } { double x,y; if (x==0 && y==0) printf("The point is on the origin"); else if (x==0) printf("The point is on the X axis"); else if (y==0) printf("The point is on the Y axis"); else if (x>0 && y>0) printf("The point is in quadrant 1"); else if (x<0 && y>0) printf("The point is in quadrant 2"); else if (x<0 && y<0) printf("The point is in quadrant 3"); else if (x>0 && y<0) printf("The point is in quadrant 4"); return (0); }
when I compile it I get the error l
ab4.c:25: error: expected identifier or '(' before '{' token
0
Comments