Rhetos
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9 Ω


Fortran90 Programme Komplexe Zahlen


Kurzes Beispielprogramm


Basiswissen


Programm fängt an ->

Program komplexe_zahlen


! Beispiele für Arithmetik mit komplexen Zahlen

! Deklarationen


complex a ! erste Eingabezahl
complex b ! zweite Eingabezahl
complex c ! Summe
complex d ! Produkt
complex e ! Wurzel

! Zuweisungen


a=(3,4) ! (Realteil,Imaginärteil)
b=(12,5) ! (Realteil,Imaginärteil)

! Rechenteil


c=a+b ! Komplexe Addition
d=a*b ! Komplexe Multiplikation
e=sqrt(a) | Komplexe Wurzel

! Ausgabe


write (*,*) c ! Schreibt auf Standardausgabe
write (*,*) d ! Schreibt auf Standardausgabe
write (*,*) e ! Schreibt auf Standardausgabe

End program komplexe_zahlen


<- Programm ist beendet