Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
|
|
@ -19,8 +19,8 @@ class SMA
|
|||
|
||||
var count := theList.Length;
|
||||
count =>
|
||||
0 { ^0.0r }
|
||||
! {
|
||||
0 : { ^0.0r }
|
||||
! : {
|
||||
if (count > thePeriod)
|
||||
{
|
||||
theList.removeAt(0);
|
||||
|
|
@ -35,22 +35,20 @@ class SMA
|
|||
}
|
||||
}
|
||||
|
||||
// --- Program ---
|
||||
|
||||
public program()
|
||||
{
|
||||
var SMA3 := SMA.new(3);
|
||||
var SMA5 := SMA.new(5);
|
||||
|
||||
for (int i := 1; i <= 5; i += 1) {
|
||||
console.printPaddingRight(30, "sma3 + ", i, " = ", SMA3.append(i));
|
||||
console.printLine("sma5 + ", i, " = ", SMA5.append(i))
|
||||
Console.printPaddingRight(30, "sma3 + ", i, " = ", SMA3.append(i));
|
||||
Console.printLine("sma5 + ", i, " = ", SMA5.append(i))
|
||||
};
|
||||
|
||||
for (int i := 5; i >= 1; i -= 1) {
|
||||
console.printPaddingRight(30, "sma3 + ", i, " = ", SMA3.append(i));
|
||||
console.printLine("sma5 + ", i, " = ", SMA5.append(i))
|
||||
Console.printPaddingRight(30, "sma3 + ", i, " = ", SMA3.append(i));
|
||||
Console.printLine("sma5 + ", i, " = ", SMA5.append(i))
|
||||
};
|
||||
|
||||
console.readChar()
|
||||
Console.readChar()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue