Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package exp;
- public class Weight {
- public static void main(String[] args) {
- int num = Integer.parseInt(args[0]);
- int a = Integer.parseInt(args[1]);
- int b = Integer.parseInt(args[2]);
- int c = Integer.parseInt(args[3]);
- Thing arr[] = new Thing[num];
- for(int i = 0; i<num;i++){
- arr[i] = new Thing();
- arr[i].a = a;
- arr[i].b = b;
- arr[i].c = c;
- System.out.println("переменная #"+i+", a="+arr[i].a+", b="+arr[i].b+", c="+arr[i].c);
- }
- }
- }
- class Thing{
- int a;
- int b;
- int c;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement