Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Random;
- public class wektor_test
- {
- public static void main(){
- Wektor w[]= new Wektor[10];
- Wektor wx= new Wektor(1.0,1.0,1.0);
- System.out.println(wx.dlugosc());
- Random los = new Random();
- double x=0;
- double y=0;
- double z=0;
- double min_dl=9999999;
- // System.out.printf(" %2.2f ",x);
- for(int i=0; i<w.length;i++){
- x=los.nextDouble()*100;
- y=los.nextDouble()*100;
- z=los.nextDouble()*100;
- w[i]= new Wektor(x,y,z);
- double temp=w[i].dlugosc();
- if(temp<min_dl){min_dl=temp;}
- System.out.println(w[i]);
- }
- System.out.print(min_dl);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement