Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Averages-Mean-angle/PL-I/averages-mean-angle.pli
Normal file
18
Task/Averages-Mean-angle/PL-I/averages-mean-angle.pli
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
averages: procedure options (main); /* 31 August 2012 */
|
||||
declare b1(2) fixed initial (350, 10);
|
||||
declare b2(4) fixed initial (90, 180, 270, 360);
|
||||
declare b3(3) fixed initial (10, 20, 30);
|
||||
|
||||
put edit ( b1) (f(7));
|
||||
put edit ( ' mean=', mean(b1) ) (a, f(7) );
|
||||
put skip edit ( b3) (f(7));
|
||||
put edit ( ' mean=', mean(b3) ) (a, f(7) );
|
||||
put skip edit ( b2) (f(7));
|
||||
put edit ( ' mean=', mean(b2) ) (a, f(7) );
|
||||
|
||||
mean: procedure (a) returns (fixed);
|
||||
declare a(*) float (18);
|
||||
return ( atand(sum(sind(a))/hbound(a), sum(cosd(a))/hbound(a) ) );
|
||||
end mean;
|
||||
|
||||
end averages;
|
||||
Loading…
Add table
Add a link
Reference in a new issue