Algorithms and programming
program is a collection of source code made by me or programmer
rules of writing the algorithm:
- Title (header)
(comment on algorithms such as how to program, initial conditions and final conditions of the algorithm)
- dictionary
(in this section are defined constant name)
- the algorithm
on each section when going in write comments about each section is written between curly braces {comment} example
exercise
1. create algorithms and pseudocode to calculate
a. tube surface area = 2x3.14xRxt
b. The volume of the tube = 3.14xR2xt
2. create algorithms and pseudocode to calculate
a. Vbalok = LxWxH
b. Beam surface area = 2 {(pxl) + (DXT) + (LXT)}
answer
1. a. read number (R.t)
multiply these four numbers is
write the result
pseudocode:
input (R, t)
LPT (2x3.14xRxt)
output (LPT)
* LPT = Surface Area of Tubes
b. read the numbers (3.14 xRxRxt)
multiply these four numbers is
write the result
pseudocode
input (RxRxt)
Vt (3.14xRxRxt)
output (Vt)
2. a. read these numbers (P, L, T)
multiply these three numbers
write the result
pseudocode:
input (P, L, T)
V (LxWxH)
output (Vbalok)
rules of writing the algorithm:
- Title (header)
(comment on algorithms such as how to program, initial conditions and final conditions of the algorithm)
- dictionary
(in this section are defined constant name)
- the algorithm
on each section when going in write comments about each section is written between curly braces {comment} example
exercise
1. create algorithms and pseudocode to calculate
a. tube surface area = 2x3.14xRxt
b. The volume of the tube = 3.14xR2xt
2. create algorithms and pseudocode to calculate
a. Vbalok = LxWxH
b. Beam surface area = 2 {(pxl) + (DXT) + (LXT)}
answer
1. a. read number (R.t)
multiply these four numbers is
write the result
pseudocode:
input (R, t)
LPT (2x3.14xRxt)
output (LPT)
* LPT = Surface Area of Tubes
b. read the numbers (3.14 xRxRxt)
multiply these four numbers is
write the result
pseudocode
input (RxRxt)
Vt (3.14xRxRxt)
output (Vt)
2. a. read these numbers (P, L, T)
multiply these three numbers
write the result
pseudocode:
input (P, L, T)
V (LxWxH)
output (Vbalok)
0 komentar:
Posting Komentar