*NAME DECIDE
3F$(10),L$(10),F(10),M(10,10),V(10),Z(10),Z$(1)
8(_BOLD: " Z88 DECISION MAKER":_BOLD
2
B<"Which best describes the type of decision you have to make:"
P" (1) Choose an item"
'Z" (2) Choose a course of action"
d"Which type (1 or 2)";C
4nC<1C>2 _BOLD:"Invalid Choice.":_BOLD:Dd@
1xC=1" What type of item is it that you"
'C=1" need to decide upon";S$
C=2S$="Action"
<"Now list each ";S$;" being considered, one at a time."
""The order is not important."
'" First, how many are there ";L0
L0>=2L0<=10dR@
TVC:tt@
#I=1L0:"Number ";I;" please";
L$(I):I
"I=1L0:I;15);L$(I):I:T`C
!B$,1)<>"Y"B$,1)<>"y"tV@
>:"How many factors are important in choosing a ";S$;:F0
F0>=1F0<=10TlA
"TVC:TDA
.,"I need a list of each of these factors."
,6I=1F0:" Factor number ";I;:F$(I):I
4@tDC:"Now decide which is the most important:"
TI=1F0:I;15);F$(I):I
/^"Which factor (by no.) is most important?"
-h" (Input 0 to change the list) ";F2:
r F2=0 TDA
| F2<1 F2>F0 D^A
2"Suppose a scale of importance from 0 to 10."
?"Say ";F$(F2);" has a value of 10 since it is at the top."
*"What value would each of the others"
2"have (decimal numbers are O.K.)?": I=1 F0
I=F2 dVA
7" ";F$(I);:F(I): F(I)>=0 F(I)<=10 dVA
1" Your input is no good, try again.":dBA
/I:F(F2)=10:C=0:I=1F0:C=C+F(I):I:I=1F0
F(I)=F(I)/C:I:
B"Now consider how each ";S$;" rates for each of the factors."
K"Consider each factor alone & rate each in terms of that factor only."
D"Let's consider ";L$(1);" to have a value of 10 on each scale."
M"Then every other ";S$;" will be given a number higher or lower than 10"
L&"according to how much better or worse than ";L$(1);" you think it is."
0tDC:I=1F0:
C:"Considering ";F$(I);" only, and assuming ";L$(1);" to be 10,"
:N"what value would you give to each of the following:"
SM(1,I)=10
X J=2 L0
4b " ";L$(J);:M(J,I): M(J,I)>=0 t@B
,l"No negative numbers. Try again.":DbB
/C=C+M(J,I):J:J=1L0:M(J,I)=M(J,I)/C:J:I
0J=1L0:V(J)=0:I=1F0:V(J)=V(J)+M(J,I)*F(I)
*I:J:I=110:Z(I)=I:I:C=L0-1:J=1L0
.I=1C:N1=Z(I):N2=Z(I+1):V(N1)>V(N2)trB
Z(I+1)=N1:Z(I)=N2
-I:J:C1=Z(1):C2=Z(2):C=100/V(C1):J=1L0
"V(J)=C*V(J):J::D=V(C1)-V(C2)
_BOLD
*" Your best choice is ";L$(C1)
_BOLD
. D<10 " but it's pretty close."
1 D<20 D>=10 " by a fair margin."
0 D>=20 " by a good-sized margin."
)"Here's the final list with ";L$(C1)
A"given a value of 100 and the others set accordingly.":tDC
5" ";(1);"U";S$," Rating",(1);"U"
@J=1L0:C=Z(J):" ";L$(C),.1*(10*V(C)+.5):J:TjC
-"The number must be between 2 and 10.":
"Is this correct";B$:
"*"Do you have another case";A$
'4 A$,1)<>"N" A$,1)<>"n"
_BOLD
-" >>Press any key to continue<<"
_BOLD
Z$=:
_BOLD
(1);"B";