Pages

Saturday, 24 December 2016

Problem 57 - Find Floor value

 Find floor value of a number adalah dimana input an tersebut pasti akan memihak ke nilai yang ke terendah kebalikan dari ceiling
Code di bawah ini :
DATA HOSTED WITH ♥ BY PASTEBIN.COM - DOWNLOAD RAW - SEE ORIGINAL
  1. public class FindFloorValueExample {
  2.   public static void main(String[] args) {
  3.     System.out.println(Math.floor(70));
  4.    
  5.     System.out.println(Math.floor(30.1));
  6.     System.out.println(Math.floor(15.5));
  7.    
  8.     System.out.println(Math.floor(-40));
  9.     System.out.println(Math.floor(-42.4));
  10.    
  11.     System.out.println(Math.floor(0));
  12.    
  13.   }
  14. }

Maka disini saya input 70, 30.1, 15.5, -40, -42.4, 0

0 comments:

Post a Comment