mygpa - gpa = 'b'; else gpa > 3.5; gpa = 'a';...

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

View Full Document Right Arrow Icon
% Spring 2011 Test 1 #4 answer % function [letter] = mygpa(gpa) if (gpa < 1) gpa = 'f'; gpa = 'd'; gpa = 'c';
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: gpa = 'b'; else gpa &gt; 3.5; gpa = 'a'; end switch gpa case 'f' letter = 'F'; case 'd' letter = 'D'; case 'c' letter = 'C'; case 'b' letter = 'B'; case 'a' letter = 'A'; end e...
View Full Document

This note was uploaded on 05/01/2011 for the course HCSC 110 taught by Professor Amosjohnson during the Spring '11 term at Morehouse.

Ask a homework question - tutors are online