ответ:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include
#include
using namespace std;
int main(int argc, char** argv) {
int num, n, co;
cout< < "number? "<
cin> > num;
cout< < "cifra? "<
cin> > n;
int count = 0;
for (; num> 0; count++) {
num /= 10;
}
for (int i = 0; i < count; i++) {
if (num[i] == n) {
co++;
}
}
cout< < "number of "<
return 0;
}
объяснение:
var
m:char;
a,b,j,k:integer;
c:real;
begin
readln(m);
if m='a' then
begin
readln(a);
readln(b);
c:= a/b - a div b;
writeln(c:4:2);
end;
if m='b' then
begin
j:=1;
k:=1;
while k < 22 do
begin
j := j*k;
k:= k+1;
end;
writeln(j);
end;
if m='c' then
begin
j:=0;
k:=10;
while k <= 50 do
begin
j := j+k;
k:= k+1;
end;
writeln(j);
end;
readln;
end.