(14) Fortran To C (Sina)

(14) Fortran To C (Sina) - Transition from Fortran to C...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Transition from Fortran to C Sina Meraji Fall 2009
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Review PROGRAM HELLO IMPLICIT NONE !This is my first program WRITE (*,*) Hello World! END PROGRAM HELLO int main() { /*This is my first program in C*/ printf ( Hello World!\n ); return 0; } FORTRAN C General Structure
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
int main() { /*This is my first program in C*/ printf ( Hello World!\n ); return 0; } Review PROGRAM HELLO IMPLICIT NONE !This is my first program WRITE (*,*) Hello World! END PROGRAM HELLO Program Block FORTRAN C
Background image of page 4
Review PROGRAM HELLO IMPLICIT NONE !This is my first program WRITE (*,*) Hello World! END PROGRAM HELLO Every C program should contain the main () function. int main () { /*This is my first program in C*/ printf ( Hello World!\n ); return 0; } FORTRAN C
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
int main() { /*This is my first program in C*/ printf ( Hello World!\n ); return 0; } Review PROGRAM HELLO IMPLICIT NONE !This is my first program WRITE (*,*) Hello World! END PROGRAM HELLO Commenting FORTRAN C
Background image of page 6
Review PROGRAM HELLO IMPLICIT NONE !This is my first program WRITE (*,*) Hello World! END PROGRAM HELLO Reserved Words int main() { /*This is my first program in C*/ printf ( Hello World!\n ); return 0; } FORTRAN C
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
int main(){ /*This is my first program in C*/ printf( Hello World!\n ); return 0;} int main () { /*This is my first progra m in C*/ printf ( Hello World! \n ); return 0; } int main() { /*This is my first program in C*/ printf ( Hello World!\n ); return 0 ; } FREE FORMAT!
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 32

(14) Fortran To C (Sina) - Transition from Fortran to C...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online