Pascal: var count:integer; n:real; begin write ('N = '); readln(n); count:=0; while n>=10 do begin n:=n/12; inc(count); end; write ('Kol-vo: ',count); readln; end.
C++: #include <iostream> using namespace std;
int main() { float n; int count = 0; cout <<"N = "; cin >>n; while (n>=10) { n/=12; ++count; } cout <<"Kol-vo: " <<count <<endl; return 0; }
var count:integer;
n:real;
begin
write ('N = ');
readln(n);
count:=0;
while n>=10 do
begin
n:=n/12;
inc(count);
end;
write ('Kol-vo: ',count);
readln;
end.
C++:
#include <iostream>
using namespace std;
int main()
{
float n;
int count = 0;
cout <<"N = ";
cin >>n;
while (n>=10)
{
n/=12;
++count;
}
cout <<"Kol-vo: " <<count <<endl;
return 0;
}