package com.codegym.task.task04.task0416;
/*
Crossing the road blindly
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
double num = Integer.parseInt(reader.nextDouble());
if ((num % 5) == 3)
{
System.out.println("yellow");
}
else if ((num % 5) == 4)
{
System.out.println("red");
}
else
{
System.out.println("green");
}
}
}
hidden #10526041
Level 5
What's the problem in my code?
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Guadalupe Gagnon
20 November 2019, 15:32
I entered 3.5 and it said "green", but the program should have said "yellow". Bug somewhere?
0