subject

I need to know how I can combine these 4 for loops into one in program Processing - programming language - Java: int x = 0;
background(0);
size (900,500);

rect(400,0,100,100);

for(x = 0; x < 9; x = x + 1)
rect(100*x, 400, 100, 100);

for(x = 1; x < 8; x = x + 1)
rect(100*x, 300, 100, 100);

for(x = 2; x < 7; x = x + 1)
rect(100*x, 200, 100, 100);

for(x = 3; x < 6; x = x + 1)
rect(100*x, 100, 100, 100);

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
Kyle, a receptionist for a building supply company, recently won an award for saving his company money on their phone system. after being presented with kyle's research, the company changed the way in which it made long-distance phone calls and cut their expenses in this area by 75 percent. the new system the kyle's company most likely adopted was wired communications switching stations voip hdtv
Answers: 3
question
Computers and Technology, 22.06.2019 18:00
Write a method named addall that could be placed inside the hashintset class. this method accepts another hashintset as a parameter and adds all elements from that set into the current set, if they are not already present. for example, if a set s1 contains [1, 2, 3] and another set s2 contains [1, 7, 3, 9], the call of s1.addall(s2); would change s1 to store [1, 2, 3, 7, 9] in some order. you are allowed to call methods on your set and/or the other set. do not modify the set passed in. this method should run in o(n) time where n is the number of elements in the parameter set passed in.
Answers: 2
question
Computers and Technology, 23.06.2019 01:00
Let r be a robotic arm with a fixed base and seven links. the last joint of r is a prismatic joint, the other ones are revolute joints. give a set of parameters that determines a placement of r. what is the dimension of the configuration space resulting from your choice of parameters?
Answers: 3
question
Computers and Technology, 23.06.2019 08:30
All of these are true about using adhesive except: a. dissimilar materials can be joined. b. mixing tips are product and material specific. c. a specific application gun may be required. d. two-part adhesives are dispensed using two mixing tips
Answers: 3
You know the right answer?
I need to know how I can combine these 4 for loops into one in program Processing - programming lang...
Questions
question
Mathematics, 25.07.2019 18:10
question
Computers and Technology, 25.07.2019 18:10