Professional Documents
Culture Documents
Function Car
Function Car
Input: -
Process: 1. BEGIN
2. Display Welcome to Gagaran’s Cars Sell and Your driving will never
be the same!
3. END
Output: Display Welcome to Gagaran’s Cars Sell and Your driving will never
be the same!
Function car_manu ()
1.
2.
3.
Function menu ()
Input: -
Process: 1. BEGIN
2. Display carbrand
3. END
Function menu ()
1.
2.
3.
Function string CarType(int brand)
Input: brand
Process:
1. BEGIN
2. DECLARE string carbrand;
3. If brand = 1
i. carbrand = “AUDI”;
4. else if brand = 2
i. carbrand = “BMW”;
5. else if brand = 3
i. carbrand = “LAN ROVER”;
6. else if brand = 4
i. carbrand = “SUBARU”;
7. else
i. carbrand = “INVALID CAR BRAND”;
8. END
Output:
2.
3 i.
4 i.
5 i.
6 i.
7 I.
8.
Input: detail,brand,carname
Process:
1. BEGIN
2. DECLARE Carprice
3. if brand = 1
4. If detail = 1
ii. carname=”AUDI A3”;
iii. Carprice=186900.00;
5. else if detail = 2
i. carname=”AUDI TT”:
ii. Carprice=286900.00;
6. else if detail = 3
i. carname=”AUDI A6”;
ii. Carprice=327900.00;
7. else if detail = 4
i. carname=”AUDI A8”;
ii. Carprice=656900.00;
8. else
i. Cout<<”INVALID CAR DETAIL”:
9. else if brand = 2
10. If detail = 1
i. carname=”BMW 1-SERIES”;
ii .Carprice=”173800.00”;
11.else if detail = 2
i. carname=”BMW Z4”:
ii. Carprice=359800.00;
12. else if detail = 3
i. carname=”BMW x6”;
ii. Carprice=666900.00;
13. else if detail = 4
i. carname=”BMW 4-SERIES”;
ii. Carprice=297800.00;
14. else
i. Cout<<”INVALID CAR DETAIL”:
28. END
Output:
1.
2.
3 4 i. ii.
5 i. ii.
6 i. ii.
7 i. ii.
8 i.
10 i. ii.
9
11 i. ii.
12 i. ii.
14 ii.
13 i. ii.
15 16 i. ii.
17 i. ii.
18 i. ii.
19 i. ii.
20 ii.
21 22 i. ii.
23 i. ii.
24 i. ii.
25 i. ii.
27 i.
26 ii.
28