Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,35 @@
|
|||
' version 22-10-2016
|
||||
' compile with: fbc -s console
|
||||
|
||||
Function f(n As Double) As Double
|
||||
return Sqr(Abs(n)) + 5 * n ^ 5
|
||||
End Function
|
||||
|
||||
' ------=< MAIN >=------
|
||||
|
||||
Dim As Double x, s(0 To 10)
|
||||
Dim As Long i
|
||||
|
||||
For i = 0 To 10
|
||||
Print Str(i);
|
||||
Input " => ", s(i)
|
||||
Next
|
||||
|
||||
Print
|
||||
Print String(20,"-")
|
||||
|
||||
For i = 10 To 0 Step -1
|
||||
Print "f(" + Str(s(i)) + ") = ";
|
||||
x = f(s(i))
|
||||
If x > 400 Then
|
||||
Print "-=< to large >=-"
|
||||
Else
|
||||
Print x
|
||||
End If
|
||||
Next
|
||||
|
||||
' empty keyboard buffer
|
||||
While InKey <> "" : Wend
|
||||
Print : Print "hit any key to end program"
|
||||
Sleep
|
||||
End
|
||||
Loading…
Add table
Add a link
Reference in a new issue