Problema 1. Scrieti un program care afiseaza la ecran secventele binare pe 4 biti.
Uses CRT;
Var I,J,K,L:0..1;
Begin ClrScr;
For I:=0 To 1 Do
For J:=0 To 1 Do
For K:=0 To 1 Do
For L:=0 To 1 Do
WriteLn(I,J,K,L); ReadKey End.
Problema 2. Scrieti un program care afiseaza la ecran numerele norocoase de 6 cifre
Uses CRT;
Var I,J,K,L,M,N:Integer;
Begin ClrScr;
For I:=1 To 9 Do
For J:=0 To 9 Do
For K:=0 To 9 Do
For L:=0 To 9 Do
For M:=0 To 9 Do
For N:=0 To 9 Do
If I+J+K=L+N+M Then WriteLn(I,J,K,L,N,M); ReadKey End.
Niciun comentariu:
Trimiteți un comentariu