programming algorithm dev c++
DESCRIPTION
includes loops, function call and etcTRANSCRIPT
![Page 1: programming algorithm DEV C++](https://reader036.vdocument.in/reader036/viewer/2022082422/55cf924c550346f57b954799/html5/thumbnails/1.jpg)
option
Case 1 input_vehicle ()
Case 2 display()
Case 3 End
Start
Invalid
true
true
true
false
false
false
![Page 2: programming algorithm DEV C++](https://reader036.vdocument.in/reader036/viewer/2022082422/55cf924c550346f57b954799/html5/thumbnails/2.jpg)
Title( )
input_vehicle( )
char vehicle, contfloat total
int parking_time, hour_enter, hour_left
Types of vehicle( C-car, B-bus, T-truck )
Case ‘C’ || ‘c’
Case ‘B’ || ‘b’
Case ‘T’ || ‘t’
Invalid
whilevehicle=‘C’&&vehicle=‘c’vehicle=‘B’&&vehicle=‘b’vehicle=‘T’&&vehicle=‘t’
true
true
true
false
false
false
![Page 3: programming algorithm DEV C++](https://reader036.vdocument.in/reader036/viewer/2022082422/55cf924c550346f57b954799/html5/thumbnails/3.jpg)
Hours vehicle enteredHours vehicle left
line ( )
Case ‘C’ || ‘c’
Case ‘B’ || ‘b’
Case ‘T’ || ‘t’
Type of vehicle : CAR
Type of vehicle : BUS
Type of vehicle : TRUCK
TIME INTIME OUT
hour left<hour enter
Parking time = 0Parking time = (hour_left-
hour_enter)+24
Parking time = 0Parking time = (hour_left-
hour_enter)PARKING TIME
true
true
true
true false
false
false
false
![Page 4: programming algorithm DEV C++](https://reader036.vdocument.in/reader036/viewer/2022082422/55cf924c550346f57b954799/html5/thumbnails/4.jpg)
vehicle= ‘C’ || vehicle- ‘c’
TOTAL: parking_time*0TOTAL = RM
TOTAL: (parking_time - 3)* 1.5
TOTAL = RM
vehicle= ‘B’ || vehicle- ‘b’
parking_time
TOTAL: parking_time*2TOTAL = RM
parking_time
TOTAL: ((parking_time - 1)* 3.7) + 2
TOTAL = RM
vehicle= ‘T’ || vehicle- ‘t’
parking_time
true
true
true
true
true
true
false
false
false
false
false
false
![Page 5: programming algorithm DEV C++](https://reader036.vdocument.in/reader036/viewer/2022082422/55cf924c550346f57b954799/html5/thumbnails/5.jpg)
TOTAL: parking_time*1TOTAL = RM
TOTAL: ((parking_time - 2)* 2.3) +( 2*1)
TOTAL = RM
vehicletype[q] = vehicle;time_in[q] = hour_enter;time_our[q] = hour_left;
alltotal[q] = total;
q++
Do you want to continue
whilecont == ‘Y’ || ‘y’
true false
![Page 6: programming algorithm DEV C++](https://reader036.vdocument.in/reader036/viewer/2022082422/55cf924c550346f57b954799/html5/thumbnails/6.jpg)
display( )
int i
PARKING LOT CHARGE
VERTICLE TYPE TIME IN TIME OUT TOTAL
i = 0, i<10
i + 1, vehicletype[i],
time_in[i],time_out[i],
alltotal[i]
i + +
falsetrue