You are on page 1of 3

BASIC COMPUTER LABORATORY

TELKOM UNIVERSITY
P Building 3rd floor Room TE3.03.04(P304), N, Building 1st floor Room TE1.01.09
(N109) Jalan Telekomunikasi No.1 Terusan Buah Batu, Bandung. 40257

Pre Assignment 10th Module


If you don’t want your TP score not equal to 0 (zero). do all the theoretical
question and program below with enthusiasm!

Theoritical Questions
Rules : do all problems.

1. Whats the meaning of recursive in algorithm?


2. Explain about base and recurrence and give an example!
3. Explain the difference between function recurrence and procedure
recurrence and give an example!
4. Mention the advantage and disadvantage when using recursive!(min3)

Look The Source Code Below! (Rewrite the source code below)

5. Specify :
A. Base and recurrence
B. The function of “n” variable
C. The function of “anonymous”
BASIC COMPUTER LABORATORY
TELKOM UNIVERSITY
P Building 3rd floor Room TE3.03.04(P304), N, Building 1st floor Room TE1.01.09
(N109) Jalan Telekomunikasi No.1 Terusan Buah Batu, Bandung. 40257

Programing Task
Rules :
Based on your gender
Boys : do only 1a and 2
Girls : do only 1b and 2

1. Create a program to calculate the sum of the Arithmetic series using the
recursive function with criteria below :
A. even series of arithmetic numbers
B. Odd series of arithmetic numbers

[EXAMPLE EVEN SERIES]


[INPUT]
Series : 4
[OUTPUT]
Output : 0 2 4 6
Total : 12
BASIC COMPUTER LABORATORY
TELKOM UNIVERSITY
P Building 3rd floor Room TE3.03.04(P304), N, Building 1st floor Room TE1.01.09
(N109) Jalan Telekomunikasi No.1 Terusan Buah Batu, Bandung. 40257

2. Create a program to input and show the students data, using array of structs
and recursive procedures!
[SAMPLE INPUT]
Banyak mahasiswa : 3
------------------------------
Data ke-1,
Nama : Idris
NIM : 110119999
Data ke-2,
Nama : Siddiq
NIM : 110219999
Data ke-3,
Nama : Cakep
NIM : 110419999

[SAMPLE OUTPUT]
Data ke-1,
Nama : Idriss
NIM : 110119999
Data ke-2,
Nama : Siddiq
NIM : 110219999
Data ke-3,
Nama : Cakep
NIM : 110419999

*LOOPING FOREVER*

You might also like