Assignment2_distance

Assignment2_distance - mode ='Bicycle elseif(distance> 10&&(distance<= 30 mode ='ride MARTA else distance> 30 mode ='take a plane on

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 c 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 fprintf('You have %.2f miles to go, so you should %s to where you have to go.\n'. .. ,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