Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. public class Rounder2D {
  2. public static void main(String[] args) {
  3.  
  4. double arry[][] = new double[2][3];
  5. GeneralClass1 Class = new GeneralClass1();
  6.  
  7. for (int i =0; i< arry.length; i++){
  8. for(int j=0; j<arry[i].length; j++){
  9. arry[i][j]=Math.random();
  10. }
  11. }
  12.  
  13. System.out.print("Unrounded numbers: \n");
  14. Class.printTwoDimArray(arry);
  15.  
  16. System.out.print("Rounded numbers: \n");
  17. for (int i =0; i< arry.length; i++){
  18. for(int j=0; j<arry[i].length; j++){
  19. arry[i][j]=Class.Round(arry[i][j], 3);
  20. }
  21. }
  22.  
  23. Class.printTwoDimArray(arry);
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement