Assignment2_distance

Assignment2_distance - mode = 'Bicycle'; elseif (distance...

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

View Full Document Right Arrow Icon
% Tanisha Billups % Matlab (CSC 110-03) % Assignment 2 (pg 111 #6) % Due: February 11, 2011 % clear clc % added 2/15/2011 in class name = input('What is your name? ','s'); dist = input ('What is the distance that needs to be covered in feet? '); distance = distdim(dist, 'feet', 'miles'); miles = distance if distance <= 2 mode = 'Walk'; elseif (distance > 2) && (distance <= 10);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: mode = 'Bicycle'; elseif (distance > 10) && (distance <= 30); mode = 'ride MARTA'; else distance > 30; mode = 'take a plane on Delta Airlines'; end % disp (mode) % added 2/15/2011 in class fprintf('%s, you have %.2f miles to go.\nYou should %s.\n'. .. , name, miles, mode)...
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