Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Rounder2D {
- public static void main(String[] args) {
- double arry[][] = new double[2][3];
- GeneralClass1 Class = new GeneralClass1();
- for (int i =0; i< arry.length; i++){
- for(int j=0; j<arry[i].length; j++){
- arry[i][j]=Math.random();
- }
- }
- System.out.print("Unrounded numbers: \n");
- Class.printTwoDimArray(arry);
- System.out.print("Rounded numbers: \n");
- for (int i =0; i< arry.length; i++){
- for(int j=0; j<arry[i].length; j++){
- arry[i][j]=Class.Round(arry[i][j], 3);
- }
- }
- Class.printTwoDimArray(arry);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement