Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Department of Computer Engineering

University of Jaffna

EC2010: Computer Programming Time: 3 hours


Lab 04
Task 01
Write a C++ function (function name: addTwo) to add two students marks without
using any C++ in-built functions.
Can you use this function (function name: addTwo) to add another one student
marks? If you are agreed with your answer explain that way? Otherwise modify that
function (function name: addTwo).

Task 02
One of your friends asked to write a C++ program that will output a multiplication
table. Your program should has a function that name multiplicationTable().
Multiplication table size depends on user hand. Sample output is below:

Task 03
Calculator has several functions. You have to write some functions to implement
your calculator. Functions are listed below.
1. Add
2. Subtract
3. Multiply
4. Divide
5. Modulus
In your C++ program, Firstly, you have to select the function name and get the
integer inputs from user. Sample output is below.;

Faculty of Engineering, UoJ Page 1


Faculty of Engineering, UoJ Page 2

You might also like