You are on page 1of 7

FAKULTI TEKNOLOGI KEJURUTERAAN

UNIVERSITI TEKNIKAL MALAYSIA MELAKA

COMPUTER PROGRAMMING

BEEA1343 SEMESTER 1 SESSION 2020/2021

LAB 2: PROGRAM ON REPETITION USING while, do-while and for LOOP CONTROL
STRUCTURE (PROBLEM SOLVING)

DATE 17/11/2020

NAME: MUHAMMAD HARIS BIN JOHARI


<picture>

MATRIX NUMBER B091910110

NAME OF INSTRUCTORS 1. Ts. AMINURRASHID BIN NOORDIN

2.

3.

EXAMINER’S COMMENTS VERIFICATION STAMP

TOTAL MARKS

Document Number Issue Number


N/A 2/10/2018
Revision Number Total Pages
5.0(N.K.A.Majid) 4
LAB REPORT FORMAT FOR BEEA1343 – COMPUTER PROGRAMMING

SECTION 1: PROGRAM DESIGN 1

1) Analysis

Input Process Output


Enter integer number Calculate times table Display times table

2) Program Design - Flow Chart (Please used Visio Professional)

3)
Program Development - Coding (Courier New, 10pt, 1sp, 3pt before & 3pt after)

2
4) Testing

Show the input you have inserted and also the program output console.
Test 1
Input 2
Output

Test 2
Input 4
Output

Test n
Input 6

3
Output

4
SECTION 2: PROGRAM DESIGN 2

3) Analysis

Input Process Output


Enter number Calculate average of Display average of number
number

4) Program Design - Flow Chart (Please used Visio Professional)

5)
Program Development - Coding (Courier New, 10pt, 1sp, 3pt before & 3pt after)

5
4) Testing

Show the input you have inserted and also the program output console.
Test 1
Input 3
Output

Test 2
Input 5
Output

Test n
Input 7
Output

6
POSSIBLE IMPROVEMENTS
Describe how you could improve your program if you had more time. What
improvements would make the program faster, more general, simpler, or easier to
understand?

Use variety of looping control to execute the command, while displaying the output
that we want. Show more result in the output other than given task in the lab session.

COMMENTS
Evaluate the lab. What did you learn from it? Was it too hard? Too easy? Suggest
improvements if you can.

From the lab session I learn how to use while, do-while and for loop control in
order to solve problem from the coding we create. It is not easy but we can practice by
do a lot of example problem solving regarding looping control structure.

You might also like