# WEEK3 - Week3 Listdirectedinput/output BIL106_WEEK3_2004 11...

This preview shows pages 1–8. Sign up to view the full content.

Click to edit Master subtitle style  BIL106_WEEK3_2004 11 Week 3 Fundamental data types List-directed input/output

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

View Full Document
BIL106_WEEK3_2004 22 Fundamental types of numbers o Integers n Whole numbers (positive/negative/zero) n Examples: 1952 3456787890123 0 -2334567 n Typical range on a 32-bit computer
BIL106_WEEK3_2004 33 Fundamental types of numbers o Reals +/- xxx . yyyyy xxx   integer part yyyyy  fractional part o A better representation: n Sign: +/- n Mantissa: a fraction between   0.1   and   1.0

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

View Full Document
BIL106_WEEK3_2004 44 real  and  integer   variables o Variable declaration: type :: name type :: name1, name2, … o integer :: a, b, c o real :: x, y, z
BIL106_WEEK3_2004 55 Arithmetic expressions o A combination of variables, constants,  operators, parentheses… (4 * Pi *Radius * * 2 + 1.2098) / 2.3

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

View Full Document
BIL106_WEEK3_2004 66 Assignment name  expression replace the content of the variable   name with  the result of the  expression
BIL106_WEEK3_2004 77 List-directed input and output o read *, var_1, var_2, … n  only variables!

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 13

WEEK3 - Week3 Listdirectedinput/output BIL106_WEEK3_2004 11...

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

View Full Document
Ask a homework question - tutors are online