Search:

Type: Posts; User: Levica

1. Thread: Best Way for Yes or No Input

by Levica
Replies
1
Views
393

Best Way for Yes or No Input

For class, I am working on a program that asks for input for speed limit, speed recorded, and if they were in a school zone or not for a ticket pricing. I wasn't sure on the best way to determine if...
2. Thread: Switch in a For loop

by Levica
Replies
5
Views
232

Re: Switch in a For loop

Random rand = new Random();
int color = 0; //1 = black, 2 = white, 3 = blue, 4 = red, 5 = yellow
for(int r=125;r<=125;r-=25) //execute loop as long as the radius is 125(the max value used) or...
3. Thread: Switch in a For loop

by Levica
Replies
5
Views
232

Re: Switch in a For loop

Thanks!! After changing the int declaration to before the for loop there was still a problem where the largest radius circle of the last color showed up, but I easily fixed that by changing r within...
4. Thread: Switch in a For loop

by Levica
Replies
5
Views
232

Switch in a For loop

for(int r=25;r<=125;r+=25)
{
int color = 1;
switch(color)
{

case 1 : g.setColor(Color.black); Expo.fillCircle(g,625,175,r); color++; break;
case 2 :...
Results 1 to 4 of 4