Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Naloga 8: 10.9.2008
//fpc 2.6.2 program Polja;//KJE JE NAPAKA const n=10; var Polje1: array[1..n] of real; Polje2: array[1..n] of real; i: integer; begin for i:= 1 to n do begin //writeln('Vpiši število: '); readln(Polje1[i]); end; for i:= 1 to n do begin if(Polje1[i] >= 0 ) then begin Polje2[i]:= Polje1[i] * 3 + sqrt(Polje1[i]);//kvadratni koren end; if(Polje1[i] < 0 ) then begin Polje2[i]:= trunc(sqr(Polje1[i]);//na kvadrat end; end; write('polje1: '); for i:= 1 to n do begin write(Polje1[i],' '); end; Writeln(); write('polje2: '); for i:= 1 to n do begin write(Polje2[i],' '); end; end.
run
|
edit
|
history
|
help
0
Урок 3, задача 8 (1481). Покупка
Circle
Promedio con aprobación
Tri 1.0
Perfect numbers
1 25 5
печать символов
Membalik string
Quadratic equation
2. Proba