Здесь Вы можете найти ответы на многие вопросы или задать свой вопрос!
var a: array [1..100] of real; i,n: integer;
t: real; begin randomize; n: =20; for i: = 1 to n do begin a[i]: =random(n*10)- 10*n div 2 ; write(a[i]: 4); if i mod 10=0 then writeln; end;
t: =a[1]
for i: = 1 to n do begin a[i]: =a[i]/t ; write(a[i]: 4); if i mod 10=0 then writeln; end; end.
3+3-3: 3=5
3-3+3+3=6
3: 3+3+3=7
3*3-3: 3=8
3*3*3: 3=9
3* 3+3: 3 = 10
#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; }}
Популярные вопросы