Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. import java.util.Random;
  2.  
  3.  
  4. public class Geld {
  5.  
  6.     public static int[] geld = new int[8];
  7.     static int n = 5;
  8.     static Random rand = new Random();
  9.    
  10.            
  11.  
  12.    
  13.     public static int[] zahlung() {
  14.        
  15.    
  16.     for ( int i=0; i < geld.length; i++) {
  17.        
  18.         geld[i] = rand.nextInt(n);
  19.        
  20.     }  
  21.  
  22.     return geld;   
  23.    
  24.  
  25.     }
  26.        
  27.     public static float[] zusammenzaehlen(int[] zahl){
  28.         float[] geldfloat = new float[8];
  29.        
  30.        
  31.         for ( int i=0; i < geldfloat.length; i++) {
  32.             geldfloat[i]=zahl[i];
  33.            
  34.         }
  35.         return geldfloat;
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement