URI Problem (Interval) 1037 Solution in Java

Problem Solving, URI

URI Problem (Interval) 1037:
Interval is a basic problem on URI online judge for novice problem solver.
You can find details on this Link.

import java.util.Scanner;

/**
 * @Author : Muhammad Harun-Or-Roshid
 * @Date : Oct 10, 2016
 * @Time : 1:36:06 AM
 */
public class Uri1037 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double x = sc.nextDouble();
        if (x >= 0 && x <= 25) {
            System.out.println("Intervalo " + "[0,25]");
        } else if (x > 25 && x <= 50) {
            System.out.println("Intervalo " + "(25,50]");
        } else if (x > 50 && x <= 75) {
            System.out.println("Intervalo " + "(50,75]");
        } else if (x > 75 && x <= 100) {
            System.out.println("Intervalo " + "(75,100]");
        } else {
            System.out.println("Fora de intervalo");
        }
    }
}

0 Comments

You may find interest following article

Complete Guide: Create Laravel Project in Docker Without Local Dependencies

Create Laravel Project Through Docker — No Need to Install PHP, MySQL, or Apache on Your Local Machine In this tutorial, I’ll show you how to create and run a full Laravel project using Docker containers. That means you won’t have to install PHP, MySQL, or Apache locally on your computer. By the end of this guide, you’ll have a fully functional Laravel development...