Data update

This commit is contained in:
Ingy döt Net 2024-07-13 15:19:22 -07:00
parent 29a5eea0d4
commit 5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions

View file

@ -0,0 +1,5 @@
real temp = 0;
for(int i = 1; i <= 100; ++i) {
temp += 1/i;
}
write(temp);

View file

@ -1,3 +1,6 @@
call Evaluation()
end
subroutine Evaluation()
lo = 1 : hi = 100 : temp = 0
for i = lo to hi
@ -5,6 +8,3 @@ subroutine Evaluation()
next i
print temp
end subroutine
call Evaluation()
end

View file

@ -0,0 +1,11 @@
100 call evaluation
110 end
120 sub evaluation()
130 lo = 1
140 hi = 100
150 temp = 0
160 for i = lo to hi
170 temp = temp+(1/i)
180 next i
190 print temp
200 end sub

View file

@ -0,0 +1,14 @@
double i = 0;
double sum(int lo, int hi, double Function() term) {
double temp = 0;
for (i = lo.toDouble(); i <= hi; i++) temp += term();
return temp;
}
double termFunc() {
return 1.0 / i;
}
void main() {
print(sum(1, 100, termFunc));
}

View file

@ -0,0 +1,11 @@
100 GOSUB 120
110 END
120 REM Evaluation
130 LET A = 1
140 LET B = 100
150 LET T = 0
160 FOR I = A TO B
170 LET T = T + (1/I)
180 NEXT I
190 PRINT T
200 RETURN

View file

@ -0,0 +1,17 @@
Sub Evaluation()
Dim i As Integer, lo As Integer = 1, hi As Integer = 100
Dim tmp As Float = 0
For i = lo To hi
tmp += (1 / i)
Next
Print tmp
End Sub
Public Sub Main()
Evaluation
End

View file

@ -0,0 +1,12 @@
100 GOSUB 120
110 GOTO 210
120 REM Evaluation
130 LET A = 1
140 LET B = 100
150 LET T = 0
160 FOR I = A TO B
170 LET T = T+(1/I)
180 NEXT I
190 PRINT T
200 RETURN
210 END

View file

@ -0,0 +1,12 @@
CALL EVALUATION
END
SUB Evaluation
LET lo = 1
LET hi = 100
LET temp = 0
FOR i = lo TO hi
LET temp = temp + (1 / i)
NEXT i
PRINT temp
END SUB

View file

@ -1,3 +1,6 @@
Evaluation()
end
sub Evaluation()
lo = 1 : hi = 100 : temp = 0
for i = lo to hi
@ -5,5 +8,3 @@ sub Evaluation()
next i
print temp
end sub
Evaluation()