home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 March
/
Chip_1999-03_cd.bin
/
zkuste
/
SGP
/
Baltazar
/
SUDLICHE.SGP
< prev
Wrap
Text File
|
1999-01-12
|
1KB
|
37 lines
SGPC 5.00 S#000000 10.09.1993 12:27:32
# include <sgpbalt.h>
;-h---------------------------------------------------------------------------
void main( void )
-s--Sudé-Liché ■ 2 -2 -20 3
Sudé-Liché
0c!
¼ísla
*1
¼íslo
p!c
____Jaké-ƒíslo?____
/1 /
Sudé-ƒíslo Liché-ƒíslo
s! l!
-o1- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0 ;prom╪nné
int ¼íslo;
c ;ƒti ƒíslo
TxtPiτⁿet╪zec("Napiτ ƒíslo (0=konec): ");
Txt¼tiI¼íslo(¼íslo);
p ;napiτ ƒíslo
TxtPiτⁿet╪zec("¼íslo "); TxtPiτL¼íslo(¼íslo,-1);
s ;napiτ, ºe ƒíslo je sudé
TxtPiτⁿet╪zec(" je sudé.\n")
l ;napiτ, ºe ƒíslo je liché
TxtPiτⁿet╪zec(" je liché.\n")
-c1- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*1 ;opakuj dokud je ƒíslo ràzné od nuly
¼íslo != 0
/1 ;ƒíslo je sudé - je d╪litelné dv╪ma beze zbytku
¼íslo % 2 == 0
=SP---------------------------------------------------------------------------
;--------------------- Konec programu -------------------