ACTL1101 Lecture Notes - Lecture 3: Control Flow, Semicolon

38 views9 pages
29 Dec 2018
Course
Professor

Document Summary

# c(t,t)&c(f,t) will give c(f,t) since t&f is f and t&t is t c(2>1,4>2)&&c(1>2,3>0)&&c(9>5,5>2) # only the first elements of each vector is considered. # since (2>1)&&(1>2) necessarily leads to f, (9>5) is not even considered. Control flow instructions if and else if (true) 1+1. ## nothing x i=2,j=3 -> i=3,j=6 x var=3 -> var=7 -> var=2. Control flow instructions while x (x+y=3<6) -> (x=3,y=1) -> (x+y=4<6) -> #(x=4,y=1) -> (x+y=5<6) -> (x=5,y=1) -> (x+y=6) -> end. Pages 119-120: you can use next to move to the next loop (see example on pages 119-120)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions