Здесь Вы можете найти ответы на многие вопросы или задать свой вопрос!
program; var i: byte; str: string; begin for i: =60 to 70 do begin str: =str+chr(i) ; end; writeln(str); end.
№1. программа на паскале
program xxx;
var n : integer;
x : array[1..10] of integer;
begin
for n: =1 to 10 do
x[n]: =sqr(n) + 5;
wreteln('последовательность х: ')
write(x[i]);
readln
end.
#include < iostream> #include < clocale> #include < cmath> using namespace std; void main(){ setlocale(lc_ctype,"rus"); int x, sum=0; cout< < "введите переменную: "; cin> > x; for(int i=1; i< x; i++) { if(x%i==0) sum+=i; } if(x==sum) {cout< < "это совершенное число"< < endl; } else {cout< < "это несовершенное число"< < endl; }}
в десятичной:
45 = (4*8)^1 + (5*8)^0 = 32 + 1 = 33
106 = (1*8)^2 + (0*8)^1 + (6*8)^0 = 64 + 1 = 65
в двоичной:
45 = 101101
106 = 1101010
Популярные вопросы