Var a,n:integer;
begin
writeln('Введите n');
readln(n);
for a:=10 to 99 do
if (a mod n =0)then writeln(a);
<span>end.</span>
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main()
{
string str = "Hello wordl";
string to_replace, word, result;
stringstream ss( str );
cin >> to_replace;
while (ss >> word)
{
if (word.find(to_replace) != string::npos)
{
word = "...";
}
result += word + " ";
}
cout << result << endl;
}
а)89/2 = 44, остаток: 1
44/2 = 22, остаток: 0
22/2 = 11, остаток: 0
11/2 = 5, остаток: 1
5/2 = 2, остаток: 1
2/2 = 1, остаток: 0
1/2 = 0, остаток: 1
8910 = 10110012
б)600/2 = 300, остаток: 0
300/2 = 150, остаток: 0
150/2 = 75, остаток: 0
75/2 = 37, остаток: 1
37/2 = 18, остаток: 1
18/2 = 9, остаток: 0
9/2 = 4, остаток: 1
4/2 = 2, остаток: 0
2/2 = 1, остаток: 0
1/2 = 0, остаток: 1
60010 = 10010110002
в)2010/2 = 1005, остаток: 0
1005/2 = 502, остаток: 1
502/2 = 251, остаток: 0
251/2 = 125, остаток: 1
125/2 = 62, остаток: 1
62/2 = 31, остаток: 0
31/2 = 15, остаток: 1
15/2 = 7, остаток: 1
7/2 = 3, остаток: 1
3/2 = 1, остаток: 1
1/2 = 0, остаток: 1
201010 = 111110110102
Const flats_per_floor = 3;var n, flat, floor: Integer;begin Write('n = '); ReadLn(n); WriteLn('Какой номер квартиры нужен человеку?'); ReadLn(flat); floor := (flat - 1) div flats_per_floor + 1; if (floor > n) or (flat <= 0) then begin writeln('Неверный номер квартиры'); exit; end; if (floor mod 2 = 1) then writeln('Едем на ', floor, ' этаж') else writeln('Едем на ', floor - 1, ' этаж');end.
<span>100011 во второй СС = 35 в обычном виде
</span><span>111100 во второй СС = 60 % в обычном виде
35 = 100%
60% от 35 = 21
Ответ: 21 ученик учится </span><span>на “хорошо” и “отлично”</span>