Loading...
Logo
Processing Forum
doner21's Profile
1 Posts
1 Responses
0 Followers

Activity Trend

Last 30 days

Loading Chart...

Show:
Private Message

    HI guys im just wondering why c = a*b/2; brings up no results for println(c) but c = 100; or some whole number does work. im just playing around with arithmetic series here and wanted to know how i could construct c interms of a and b 


    Series series;

    void setup(){
      background(255);
     size(500,500);
     
     series = new Series(10,11);
     
    }
    void draw(){
      
    series.move();


    }
    class Series{
      int a;
      int b;
     
      int[] n;
      int c=a*b/2;

      Series(int a_,int b_ ){
     
     n = new int[c];
      a = a_;
      b = b_;

       
    }
      
    void move(){
     
     for (int c= 0;c<n.length;c++){
     
     n[c] = n[c]+1;
     
     println (c); 
     }
       
    }


    }