U already set up the logic nicely, maybe this how the program would look in its java source code
import java.util.*;
public class Rounder
{
public static void main(String[] args)
{
double z;
Scanner scan = new Scanner(System.in);
z = scan.nextDouble();
if((z%1)>=.50)
{
z++;
}
System.out.println((int)z);
}
}
already tried it, and it works, hope this helps
