You are on page 1of 2

Fakulti Sains Komputer dan Teknologi Maklumat

Universiti Tun Hussein Onn Malaysia



BIT 10303 Computer Programming
Sem I 2014/2015

Assignment
Each student will get "hands-on" experience with the development an application by using C
programming language. In this assignment, every group (4/5/6 MEMBERS PER GROUP) needs to
come out with a/an PROGRAM/APPLICATION and a written REPORT.
The application must follow the requirements stated in the question given. Students may (and are
encouraged to) apply all the necessary methods that have been taught in the class. Groups are
required to submit their application together with a report justifying their program. The report must
include a discussion of what the program does, and why your group uses the
method chosen. Show 3 sample inputs and output from your program.

Your project is 15% of your total final marks and will be assessed as follows:

QUALITY OF WORK PRODUCED -Able to apply the theory in answering the question/
able to solve the problem without error/ Report clearly justify the methods used, grammar and
language use in report, contents are arrange accordingly able writing report where grammar /
able to organize coding with appropriate indent and command.
KNOWLEDGE -Depth of knowledge and methods used, able to justify the methods chosen
CREATIVITY AND INNOVATION- Idea, improvement and transformation, output layout







The project is due on 6
th
November 2014 before 5 pm. Each group has to submit:
i. Program and Application written in a CD
ii. Written report

Instruction: Answer all questions

Q1. Give the appropriate answer for the following questions
i. If the variable x has the value 10, what are the values of x and a after each of the
following statements is executed separately.
a = x++;
a = ++x;

ii. To what values does the expression 10 % 3 evaluate?

iii. To what values does the expression 5 + 3 * 8 / 2 + 2 evaluate?

iv. Rewrite the expression in question Q1. Iii, adding parentheses so that it evaluates to 16.

Q2. Write a nested for loops that prints the following output:












Q3. Write a program using for loop that creates a table of Olympic competition running distances in
meters, kilometers, yards, and miles. The following distances should be used:
100 m
200 m
400 m
800 m
Use the pattern exhibited in these distances to write your program. (Note: 1m = 0.001km = 1.094yd =
0.0006215 mi)

Input specifications. No external input (meaning no data input from the key board of file). All distances
are real numbers

Output specifications. Print the results to the screen in the following manner:

Table of Olympic running distances
Meters Kilometers Yards Miles
100 __ __ __
200 __ __ __
400 __ __ __
800 __ __ __

a b c d e f g h h g f e d c b a

a b c d e f g g f e d c b a

a b c d e f f e d c b a

a b c d e e d c b a

a b c d d c b a

a b c c b a

a b b a
a a

You might also like