Re: simple byte
From: Knute Johnson (nospam_at_sagebrush.frazmtn.com)
Date: 10/24/03
- Next message: Starmage: "Re: (VERY LONG) More newbie questions on constructor/set+get methods"
- Previous message: Québec: "simple byte"
- In reply to: Québec: "simple byte"
- Next in thread: Québec: "Re: simple byte"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Oct 2003 18:32:56 -0700
Québec wrote:
> Hi,
>
> I cant get it. How do you write a loop to get the one (+1) after
> right shifting.
>
> for(int i = 3; i < 101; i++){
> if(i%2 > 0)
> System.out.print (" " + ((i>>1)));
>
> Jean Pierre
>
>
For i from 3 to 100 by ones
If i is odd
Print 2 spaces and i divided by 2
Now what do you really want to do?
-- Knute Johnson email s/nospam/knute/ Molon labe...
- Next message: Starmage: "Re: (VERY LONG) More newbie questions on constructor/set+get methods"
- Previous message: Québec: "simple byte"
- In reply to: Québec: "simple byte"
- Next in thread: Québec: "Re: simple byte"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|