Zoo tutorials:
[
SQL
|
Linux
|
XML
]
ProgZoo:
[
Java
|
C#
|
VB
|
C++
|
Perl
]
Log in
WebCT ID:
Password:
Napier students only
A Gentle Introduction to
Programming
Tutorial:
Number Functions
The basic mathematical operators (add, subtract, multiply, divide) are:
+ - * /
Math functions
Sample evaluation
Math.min Math.max
Math.min(3,4) is 3
1. Math.max
public class Demo{ public static void main(String argv[]) { System.out.println(Math.max(Math.PI*Math.PI, Math.E*Math.E*Math.E)); } }
Big
Print the largest of pi squared and
e
cubed.
test text