relational operators

relational operators - function = relationalOps(n) if (n...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 % relationalOps(number) -> statement about n % Description: % This function will take a given number and print a statement about % that number, e.g n is greater than ten % Examples: % relationalOps(0) -> n is 10 or less % relationalOps(19) -> n is between 10 and 20 % relationalOps(100) -> n is 30 or greater
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: function = relationalOps(n) if (n <= 10) fprintf('n is ten or less \n') elseif (10 < n && n < 20) fprintf('n is between 10 and 20 \n') elseif (20 <= n && n < 30) fprintf('n is twenty or greater but less than 30 \n') else (n >= 30) fprintf ('n is 30 or greater than 30 \n') end...
View Full Document

This note was uploaded on 10/23/2009 for the course CISC 106 taught by Professor Mcgeary during the Fall '08 term at University of Delaware.

Ask a homework question - tutors are online