summaryrefslogtreecommitdiff
path: root/548/CH2/EX2.6/2_6.sce
blob: 71080b48c0ddfb8f6c167a77ea8288ca290862b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pathname=get_absolute_file_path('2_6.sce')
filename=pathname+filesep()+'2_6data.sci'
exec(filename)
function[ftPerSecond]=conversion(MilePerHour)
    ftPerSecond=(5280*MilePerHour)/3600;
endfunction
function[meterPerSecond]=conversion1(MilePerHour)
    meterPerSecond=(1609.344*MilePerHour)/3600;
endfunction
disp("1 ftPerSecond=(5280*MilePerHour)/3600")

disp(conversion(60),"velocity in terms of ft/s");

disp("1 meterPerSecond=(1609.344*MilePerHour)/3600")
disp(conversion1(60),"velocity in terms of m/s");