PredefinedMethods2A

PredefinedMethods2A - System.out.println"min(15 25...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//Predefined Methods: Examples of Table 7-1 / import static java.lang.Math.*; i public class PredefinedMethods2A { public static void main(String[] args) { System.out.println("abs(-67) = " + abs(-67)); System.out.println("abs(35) = " + abs(35)); System.out.println("abs(-75.38) = " + abs(-75.38)); System.out.println("ceil(56.34) = " + ceil(56.34)); System.out.println("exp(3) = " + exp(3)); System.out.println("floor(65.78) = " + floor(65.78)); System.out.println("log(2) = " + log(2)); System.out.println("max(15, 25) = " + max(15, 25)); System.out.println("max(23.67, 14.28) = " + max(23.67, 14.28));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.println("min(15, 25) = " + min(15, 25)); System.out.println("min(23.67, 14.28) = " + min(23.67, 14.28)); System.out.println("pow(2.0, 3.0) = " + pow(2.0, 3.0)); System.out.println("pow(4, 0.5) = " + pow(4, 0.5)); System.out.println("round(24.56) = " + round(24.56)); System.out.println("round(18.35) = " + round(18.35)); System.out.println("sqrt(4.0) = " + sqrt(4.0)); System.out.println("sqrt(2.25) = " + sqrt(2.25)); System.out.println("cos(0) = " + cos(0)); System.out.println("sin(0) = " + sin(0)); System.out.println("tan(0) = " + tan(0)); } }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online