View Single Post
  #2 (permalink)  
Old 07-20-2007, 09:25 AM
cruxblack cruxblack is offline
Senior Member
 
Join Date: Jul 2007
Posts: 130
cruxblack will become famous soon enough
U already set up the logic nicely, maybe this how the program would look in its java source code
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
Reply With Quote