-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfunction notes.txt
64 lines (32 loc) · 965 Bytes
/
function notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
11/22/2016 thursday notes-cop1000
no class thursday
happy thanksgiving
quiz next thursday 12/1-based on functions
assignment 9 due 11/28/2016
test 3 tuesday 12/6/16
functions: breaking down big problems down to smaller problems
you can reuse same code.
funtions
module-break problem
functions are gonna have a name
programmer chooses name for the funtion, give relevent proper name. not somthing stupid
name() this is a function
we've used main() in this class
{
block of code
}
starts with main and ends with main. or function
returntype name()-means datatype
int main is returntype
example: int myfunction(),-->valid funtion
1) declare functions
2)definition
3)calling/invoking
not returning anything is called void myfunction(),
{
block of code
return___ ;
}
function definitions at top is option
(WATCH VIDEOS)
DECLARE FUNCTIONS FIRST THEN WRITE CODE OR PROBLEM.