{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Testing Sum of 3 nums - elseif(sumThreeNums(10-234,9786 ~=...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 %someFcn(number, number) -> true/false %Description: % This function tests our sumThreeNums function and returns the result as true or false function result = sumThreeNumsTest() result = true if (sumThreeNums(3,4,5) ~= 12) disp('error calculating sumThreeNums(3,4,5)') result = false
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: elseif (sumThreeNums(10,-234,9786) ~= 9562) disp('error calculating sumThreeNums(10,-234,9786)') result = false elseif (sumThreeNums(-300,0,-3000) ~= -3300) disp('error calculating sumThreeNums(-300,0,-3000)') result = false else disp('sumThreeNums function passed') end...
View Full Document

{[ snackBarMessage ]}