Create a code that could return the Parking ticket bill

1 answer below »
Create a code that could return the Parking ticket bill
Answered Same DayOct 31, 2021

Answer To: Create a code that could return the Parking ticket bill

Rahul answered on Nov 01 2021
158 Votes
function total_amount = Parking_Bill(a,b)
if b(1,4) > 60
n = int64(b(1,4)/60);
b(1,4) = b
(1,4) - n*60;
b(1,3) = b(1,3) + n ;
end
if b(1,3) > 24
n1 = int64(b(1,3)/24);
b(1,3) = b(1,3) - n1*24;
b(1,2) = b(1,2) + n1;
end
if b(1,2) > 7
n2 = iny64(b(1,1)/7);
b(1,2) = b(1,2) - n2*7;
b(1,1) = b(1,1) +n2;
end
if a==1
if b(1,3) < 1 && b(1,4) > 0
total_amount_d = 2;
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here