08-04-2024, 09:08 PM
(This post was last modified: 08-04-2024, 09:13 PM by Kernelpanic.)
@Jack - It works and is not as complicated as Pete's solution. - A saying comes to mind:
Why do it simply when one can do it complicated?
PS: I didn't find snprintf() in my C books, only here: snprintf()
Why do it simply when one can do it complicated?
Code: (Select All)
'Umrechnung Dezimalzahl in Exponentialschreibweise - 4. Aug. 2024
'Referenz S.263 - Print Using Formatierungssymbole
Option _Explicit
'Bei Double erscheint ein "D" statt "E"
Dim As Single x, z
Locate 2, 3
Print "Dezimalzahl in Exponentialdarstellung"
Locate 3, 3
Print "====================================="
Locate 5, 3
Input "Dezimalzahl : ", x
Locate 6, 3
Print Using "Als Exponentialzahl: ##.##^^^^"; x
Locate 8, 3
Input "Weitere Dezimalzahl: ", z
Locate 9, 3
'5 Exponentialsymbole ^ bewirken dreistellige Ausgabe des Exponenten
Print Using "Als Exponentialzahl: ##.##^^^^^"; z
End
PS: I didn't find snprintf() in my C books, only here: snprintf()