Re: simple byte

From: Knute Johnson (nospam_at_sagebrush.frazmtn.com)
Date: 10/24/03


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...


Relevant Pages

  • Re: OT: GOOD For Switzerland...!!!
    ... I've spent the odd few days in Quebec and have found the ... people to be perfectly pleasant and generally happy when I attempted ...
    (rec.food.cooking)
  • Re: Brookers Screenwipe
    ... otherwise English conversation would be seen as odd. ... Porsche seems to be shifting at the moment from one syllable to two. ...
    (uk.media.tv.misc)
  • Re: Keeping family together in the teen years
    ... In article, Catherine Woodgold says... ... >dragonlady writes: ... >> It's an odd, fine and ever shifting line. ...
    (misc.kids)
  • shifting bits, shift 32 bits on 32 bit int
    ... Noticed something odd in the way bit shifting was working today. ... As far as I have ever heard, shifting will shift in zeros(signed ints ... Now I understand doing a shift like this seems silly, ...
    (comp.lang.cpp)
  • Re: Brookers Screenwipe
    ... otherwise English conversation would be seen as odd. ... Porsche seems to be shifting at the moment from one syllable to two. ...
    (uk.media.tv.misc)