1998-10-27から1日間の記事一覧

論理和・論理積・排他的論理和

明解C言語 入門編 > 7. 基本型 > 論理和・論理積・排他的論理和 Delphi program Project1;{$APPTYPE CONSOLE}uses SysUtils;function count_bits(x:Longword):Integer; var count:Integer; begin count := 0; while (x <> 0) do begin if x and 1 <> 0 then…