Система задач и упражнений по языку программирования Pascal. Часть 2 - 20 стр.

UptoLike

20
6. Верно ли выполнены операции:
(1) [2,5,3,4] * [3,2,8,5,6,1] = [2,5,3];
(2) [7,8,9,11,25] * [3,2,8,9,27] = [8,8,9,9];
(3) ['a','b','c','d','e','f'] + ['a','k','l','m','n']=
['a','a','b','c','d','e','f','k','l','m','n'];
(4) ['k','l','m','o','p'] + ['m','f','r','z'] =
['k','l','m','o','p','f','r','z'];
(5) [1,2,9,20,6] + [4,1,11] = [1,2,9,20,6,4,1,11];
(6) [5,7,10] * [6,8,10] = [10,10];
(7) [4,6,8,9] * [3,6,7,8] = [8,6];
(8) [1,9,7,6] * [7,3,0,1] = [1,7];
(9) [1,2,9,5] - [2,9,7,6,3] = [1,5];
(10) ['A','K','L','M','O'] -
['K','L','F','R','Z'] =
['A','M','O','F','R','Z'];
(11) [ ] + ['3','4'] = ['0','3','4'];
7. Верно ли сравнения:
(1) ['a'..'z'] < ['a'..'Z'];
(2) [1,2,3,4] < ['1','2','3','4','5'];
(3) [январь,февраль,март] + [март,май,июнь] > [январь,февраль,март,май,июнь];
(4) ([6,7,8,9] + [27..40]) * [8..30] = [8..30] - [9..27];
(5) ([5,3,10,11] + [16..35]) * [10..20] <> [10..20] - [11..16];
(6) [2,3,5] = [5,2,3]
8. Сравнить:
(1) А = [6,7,2];
B = [2,3,7,8,2,6,1];
(2) А = [8,9,10,11,12]; -[56,17,9,11];
B = [8..12];
(3) B = [19..15];
A =([8..20] - [4,6,11,20,14,13]) *
[9,25,16,11,7,4,13];
(4) A = ([25..45] + [40..50]) -
[32,40,52,26,18,28];
B = ([24..31] * [25,27,29,30,31,16,42]) +
([33..50] - [40,16,28,51]);
(5) A = [6,9,3,7,14]-[9,14,5,G,4];
B = [6,9,11,3,22,7] * [11,5,6,7,9,3]-
(6) A = [1,2,3,4] * [1,5,6,7] -
[1,3,7,5,8,9];
B = [2,9,1,10,5] * [1,6,2,3] + [4,6];
(7) A = ['a'..'d'];
B = ['a'..'f'];
9. Какие операции надо осуществить с множествами В и С, чтобы получить в
результате множество А:
(1) B = ['A','K','L','Z']; C = ['D','L','V','K','F']; A = ['K','L'];
(2) B = [1..12]; C = [6..11]; A = C;
(3) B = [25..36]; C = [30..40]; A = B;
(4) B=['A','K','R','F']; C=['K','H','N','R']; A = ['A','F'];
(5) B=['A','K','F','R','Z','N','P','H']; C = ['K','R','N','H']; A = [ ]
10. Какие операции надо совершить
с множествами B, C и D, чтобы получить в
результате множество А:
(1)
B = ['1','2','4','6','8'];
C = ['1','4','6'];
D = ['2','5','4','8','3'];
A = ['8','2'];
(2)
B = [1,2,3,4,5];
C = [8,9,11,15,20];
D = [3,4,9,11];
A = D;
(3)
B = ['K','L','M','N'];
C = ['H','F','C','R'];
D = ['L','C'];
A=['K','L','F','M','C',
'N','H','R'];
(4)
B
= ['O','H','Q','K','M','N'];
C
= ['H','K','F','R','P','Z'];
D
= ['H','N','A','K','W','O'];
A
= ['H','K'];