Commit bddd45a2 authored by Susheel Busi's avatar Susheel Busi
Browse files

Merge branch 'develop' of...

Merge branch 'develop' of ssh://git-r3lab-server.uni.lu:8022/R3school/git.practice into homework_BUSI
parents af411e1c ed9c9217
function c = addTwoNumbers_AliceOldano(a, b)
% addTwoNumbers_myName(a, b) returns the sum of a and b
c = a + b;
end
function c = addTwoNumbers_myName(a, b)
% addTwoNumbers_diana(a, b) returns the sum of a and b
c = a + b;
end
function c = addTwoNumbers_guadalupe(a, b)
% addTwoNumbers_myName(a, b) returns the sum of a and b
c = a + b;
end
function c = addTwoNumbers_laurent(a, b)
% addTwoNumbers_laurent(a, b) returns the sum of a and b
c = a + b;
end
function c = multiplyTwoNumbers_AliceOldano(a, b)
% multiplyTwoNumbers_myName(a, b) returns the product of a and b
c = a * b;
end
function c = multiplyTwoNumbers_diana(a, b)
% multiplyTwoNumbers_diana(a, b) returns the product of a and b
c = a * b;
end
function c = multiplyTwoNumbers_myName(a, b)
function c = multiplyTwoNumbers_guadalupe(a, b)
% multiplyTwoNumbers_myName(a, b) returns the product of a and b
c = a / b;
c = a * b;
end
function c = sqrt_AliceOldano(d)
c = d^(1/2);
end
\ No newline at end of file
function y = sqrt_diana(x)
y = sqrt(x);
end
function c = sqrt_guadalupe(a)
% sqrt_guadalupe(a) returns the square root of a
c = a^(1/2);
end
% Test file
c = addTwoNumbers_AliceOldano(1, 2)
% test if the addition function works as expected
assert(c == 3)
d = multiplyTwoNumbers_AliceOldano(c, c)
% test if the multiplication function works as expected
assert(d == 9)
% Test for the homework
e = sqrt_AliceOldano(d)
% test my sqrt function
assert(e == sqrt(d))
% Test file
c = addTwoNumbers_diana(1, 2)
% test if the addition function works as expected
assert(c == 3)
d = multiplyTwoNumbers_diana(c, c)
% test if the multiplication function works as expected
assert(d == 9)
% Test for the homework
% test my sqrt function
assert(sqrt_diana(d) == sqrt(d))
% Test file
c = addTwoNumbers_guadalupe(1, 2)
% test if the addition function works as expected
assert(c == 3)
d = multiplyTwoNumbers_guadalupe(c, c)
% test if the multiplication function works as expected
assert(d == 9)
% Test for the homework
% test my sqrt function
assert(sqrt_guadalupe(d) == sqrt(d))
% Test file
c = addTwoNumbers_myName(1, 2)
c = addTwoNumbers_laurent(1, 2)
% test if the addition function works as expected
assert(c == 3)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment