URI Online Judge Solution 1041 Coordinates of a Point – Solution in C, C++, Java, Python and C#

URI Online Judge Solution 1041| Beginner
URI Problem Link – https://www.urionlinejudge.com.br/judge/en/problems/view/1041

Problem Name: URI Coordinates of a Point Code
Problem Number : URI  1041 solution
Online Judge : URI Online Judge Solution
Category: Beginner
Solution Language : C,C plus plus, java, python, c#(c sharp)

URI 1041 Coordinates of a Point  Code in C / URI 1041 Coordinates of a Point  solution in C:

#include<stdio.h>
int main()
{

float
a,b;
while
(scanf("%f %f",&a,&b)==2)
{


if
(a==0 && b==0)
printf("Origemn");

else if
(b==0)
printf("Eixo Xn");

else if
(a==0)
printf("Eixo Yn");

else if
(a>0 && b>0)
printf("Q1n");

else if
(a<0 && b>0)
printf("Q2n");

else if
(a<0 && b<0)
printf("Q3n");
else

printf("Q4n");

}

return
0;
}

URI 1041 Coordinates of a Point  Code in C++ / URI 1041 solution in CPP:

#include <cstdio>

int
main()
{

float
x;
float
y;

scanf("%f", &x);
scanf("%f", &y);

if
(x == 0 && y == 0){
printf("Origemn");
}
else if(x == 0){
printf("Eixo Yn");
}
else if(y == 0){
printf("Eixo Xn");
}
else if(x > 0 && y > 0){
printf("Q1n");
}
else if(x > 0 && y < 0){
printf("Q4n");
}
else if(x < 0 && y > 0){
printf("Q2n");
}
else{
printf("Q3n");
}


return
0;

}

URI 1041 Coordinates of a Point  Code in java/ URI 1041 solution in Java:

import java.util.Scanner;


public class
Main {

public static
void main(String[] args) {

float
x;
float
y;
Scanner sc = new Scanner(System.in);

x = sc.nextFloat();
y = sc.nextFloat();

if
(x == 0 && y == 0){
System.out.printf("Origemn");
}
else if(x == 0){
System.out.printf("Eixo Yn");
}
else if(y == 0){
System.out.printf("Eixo Xn");
}
else if(x > 0 && y > 0){
System.out.printf("Q1n");
}
else if(x > 0 && y < 0){
System.out.printf("Q4n");
}
else if(x < 0 && y > 0){
System.out.printf("Q2n");
}
else{
System.out.printf("Q3n");
}

}
}

URI 1041 Coordinates of a Point  Code in Python / URI 1041 solution in Python:

URI Solution 1041 Coordinates of a Point  Code / URI 1041 solution in  C# (C Sharp):

Demonstration:

Just implement this in coding. Since having any problem just put a comment below. Thanks

Tags: URI Online Judge Solution, URI OJ Solution list, URI Problems Solution, URI solver, URI all problem solution list, URI Coordinates of a Point code in C, URI 1041 Coordinates of a Point  code in C++, URI Coordinates of a Point solution in C, URI solution, URI 1041 solution in C,URI 1041 solution in C++-CPP,URI 1041 solution in C# (C sharp),URI 1041 solution in Java,URI 1041 Coordinates of a Point  solution in Python,

By Maniruzzaman Akash

Maniruzzaman Akash is a freelance web developer with most popular Laravel PHP frameork and Vue JS

Leave a Reply

Your email address will not be published. Required fields are marked *