URI Problem 1041 (Coordinates of a Point) solution( Bangla ) | C language

** Before watching the solution please make sure that you have tried enough **

#include <stdio.h>

int main()
{
    float a,b;
    scanf("%f %f", &a, &b);
    if (a == 0.0 && b == 0.0){
        printf("Origem\n");
    }
    else if (a == 0.0){
            if(b > 0.0){
                printf("Eixo Y\n");
            }
            else if(b < 0.0){
                printf("Eixo Y\n");
            }
    }
    else if(b == 0.0){
         if(a > 0.0){
                printf("Eixo X\n");
            }
            else if(a < 0.0){
                printf("Eixo X\n");
            }
    }
    else if (a>0.0 && b>0.0){
        printf("Q1\n");
    }
    else if (a<0.0 && b>0.0){
        printf("Q2\n");
    }
    else if (a<0.0 && b<0.0){
        printf("Q3\n");
    }
    else if (a>0.0 && b<0.0){
        printf("Q4\n");
    }
    return 0;
}

 

You can find video explanation of this solution in our YouTube channel. You will find the YouTube channel link in the top right corner.
Like our Facebook page and SUBSCRIBE to our YouTube channel.
Stay connected.

If you face any problem, let me know in the comment section.

Leave a Comment