fb:porticula NoPaste
Noch'n Pythagoras
| Uploader: | ytwinky |
| Datum/Zeit: | 01.09.2007 23:56:45 |
#include "vbcompat.bi"
Function Runde(Variable As Double, nk As Integer) As Double
Return cInt(Variable*10^nk)/10^nk
End Function
Const Rho=50/Atn(1)
Dim As Double a, b, c
Screen 18,32
Print "Dreiecksberechnung nach Pythagoras:"
Line(200, 200)-(504, 200)
Line(200, 200)-(400, 50)
Line(400, 50)-(504, 200)
Draw String (300, 100), "b"
Draw String (460, 110), "a"
Draw String (350, 210), "c"
Draw String (190, 200), "a"
Draw String (510, 200), "b"
Draw String (397, 30), "c"
Circle (397, 70), 1,,,,,F
Circle (400, 50), 40,, 240/Rho, 340/Rho
Input "Seite a:", a
Print
Input "Seite b:", b
Print
c=((a*a)+(b*b))^0.5
Print "Seite a=" &Format(Runde(a, 3), "#####.000")
Print "Seite b=" &Format(Runde(b, 3), "#####.000")
Print "Seite c=" &Format(Runde(c, 3), "#####.000")
Sleep



FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!



