URI Online Judge Solution 1035 in JAVA - Online Judge

Latest

This is an Online Judge Solution Base Site. We can discuss & Solve any contest solution in Programming.

Sunday, March 22, 2020

URI Online Judge Solution 1035 in JAVA

Problem Name: 1035 Selection Test 1 code
Problem Number : URI - 1035 Selection Test 1 solution
Online Judge : URI Online Judge Solution
Category: Beginner

Solution in JAVA

 import java.util.Scanner;


public class Main {

 public static void main(String[] args) {
  int a, b, c, d;
  Scanner sc = new Scanner(System.in);
  a = sc.nextInt();
  b = sc.nextInt();
  c = sc.nextInt();
  d = sc.nextInt();

  if((b > c) && (d > a) && (c + d > a + b) && c > 0 && c > 0 && (a % 2 == 0))
   System.out.printf("Valores aceitos\n");
  else
   System.out.printf("Valores nao aceitos\n");

 }

}

No comments:

Post a Comment

Thanks..