-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolicy Number pseudocode .txt
90 lines (53 loc) · 1.58 KB
/
policy Number pseudocode .txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
A program that accepts insurance policy data, including a policy number, customers last name, customers first name, age, premium due date(month, day, year)
and number of driving accidents in the last 3 years.
if
start
Declarations
num policyNumber
num userPolicyNumber
string lastName
string firstName
num age
string month
string userMonth
num day
num userDay
num year
num userYear
num accidents
output " what is the insurance policy number?"
input userPolicyNumber
output " what is your last name ?"
input lastName
output " what is your firstName"
input firstName
output " what is your age?"
input age
output "what is the day"
input day
output "what is the month"
input month
output "what is the year"
input year
output " how many accidents in the last 3 years?"
input accidents
if (policyNumber < 1000 || policyNumber > 9999)
policyNumber = 0
else
policyNumber = userpolicyNumber
endif
if (month >= 13 && day >= 32)
month = 0
day = 0
year = 0
else
month = userMonth
day = userDay
year = userYear
endif
output " your policyNumber is:" , policyNumber , "click enter to see more"
output "your name is:" , lastName , firstName , "click enter to continue "
output " your age is :" , age , "click enter to continue"
output " due date is:" month , day, year
output "the number of accidents that occured in the last 3 years is:" , accidents
stop