WEEK3 - Week3 ClicktoeditMastersubtitlestyle...

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

View Full Document Right Arrow Icon
Click to edit Master subtitle style  BIL106_WEEK3_2004 11 Week 3 Fundamental data types List-directed input/output
Background image of page 1

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

View Full DocumentRight Arrow Icon
 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
Background image of page 2
 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
Background image of page 3

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

View Full DocumentRight Arrow Icon
 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
Background image of page 4
 BIL106_WEEK3_2004 55 Arithmetic expressions o A combination of variables, constants,  operators, parentheses… (4 * Pi *Radius * * 2 + 1.2098) / 2.3
Background image of page 5

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

View Full DocumentRight Arrow Icon
 BIL106_WEEK3_2004 66 Assignment name  expression replace the content of the variable   name with  the result of the  expression 
Background image of page 6
 BIL106_WEEK3_2004 77 List-directed input and output o read *, var_1, var_2, … n  only variables!
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 03/13/2011.

Page1 / 13

WEEK3 - Week3 ClicktoeditMastersubtitlestyle...

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

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