Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float [] milesRun = {4,15,25,10,19,1,26};
- void setup() {
- size(350,200);
- background(255);
- fill(120,120,200);
- stroke(255);
- }
- void draw() {
- int count = 0;
- int multiplier = -5;
- float rectWidth = width/(milesRun.length);
- while(count < milesRun.length) {
- rect(rectWidth * count,height,rectWidth,milesRun[count]*multiplier);
- count++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement