Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
doner21
doner21's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
arrays and for loops
[5 Replies]
07-Apr-2013 07:44 PM
Forum:
Programming Questions
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);
}
}
}
«Prev
Next »
Moderate user : doner21
Forum