Search:

Type: Posts; User: Levica

Search: Search took 0.08 seconds.

  1. Replies
    1
    Views
    1,295

    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. Replies
    5
    Views
    1,060

    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. Replies
    5
    Views
    1,060

    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. Replies
    5
    Views
    1,060

    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