Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- double x, y;
- int main()
- {
- printf(" Leandro Soares");
- printf("\n x : ");
- scanf("%lf", &x);
- printf("\n y : ");
- scanf("%lf", &y);
- if( x == 0 )
- {
- if( y == 0)
- {
- printf("\n\n o ponto esta na origem \n\n\n\n");
- return 0;
- }
- if( y > 0 )
- {
- printf("\n\n o ponto esta no eixo y positivo \n\n\n\n");
- return 0;
- }
- if( y < 0 )
- {
- printf("\n\n o ponto esta no eixo y negativo \n\n\n\n");
- return 0;
- }
- }
- if( y == 0 )
- {
- if( x == 0 )
- {
- printf("\n\n o ponto esta na origem \n\n\n\n");
- return 0;
- }
- if( x > 0 )
- {
- printf("\n\n o ponto esta no eixo x positivo \n\n\n\n");
- return 0;
- }
- if( x < 0 )
- {
- printf("\n\n o eixo esta no eixo x negativo \n\n\n\n");
- return 0;
- }
- }
- if( y > 0 )
- {
- if( x > 0 )
- {
- printf("\n o ponto e positivo e esta no primeiro quandrante \n\n\n\n");
- return 0;
- }
- if( x < 0 )
- {
- printf("\n o ponto e negativo e esta no quarto quadrante \n\n\n\n");
- return 0;
- }
- }
- if( y < 0 )
- {
- if( x > 0 )
- {
- printf("\n o ponto e negativo e esta no segundo quadrante \n\n\n\n");
- return 0;
- }
- if( x < 0)
- {
- printf("\n o ponto e negativo esta no terceiro quadrante \n\n\n\n");
- return 0;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement