Skip to content
Snippets Groups Projects
Commit 7b265824 authored by vand's avatar vand
Browse files

Upload New File

parent 00179d26
No related branches found
No related tags found
No related merge requests found
hours = 5;
minutes = 15;
converted = convert_time(hours,minutes);
disp(converted)
% Instead of writing function from scratch, you should first implement the
% functionality, as in the code below.
minutes_in_hour = 60;
mnt = minutes/minutes_in_hour;
total = hours + mnt;
% Then, you can pack it in the function.
function total = convert_time(hours,minutes)
minutes_in_hour = 60;
mnt = minutes/minutes_in_hour;
total = hours + mnt;
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment