Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
Program Love_Calculator;
Uses Wincrt;
Var
Diff,Diff1,Diff2,Diff3,i,i1,m,m1,p,F,g:Integer;
Ch,Ch1,X: String;
ID,Z:Char;
 
Begin
Writeln('');
Writeln('                                   ***   ***      ');
Writeln('                                  *   * *   *     ');
Writeln('                                  *    *    *     ');
Writeln('                                  *         *     ');
Writeln('                                   *       *      ');
Writeln('                                    *     *       ');
Writeln('                                     *   *        ');
Writeln('                                      * *         ');
Writeln('                                       *          ');
Writeln('');
Writeln('              © Ben Hammadi Amir © To contact : E-Mail : <a href="mailto:Narsimanna@yahoo.fr">Narsimanna@yahoo.fr</a> ');
Writeln('                                              : Tel : +216 21 62 83 53  ');
Writeln('');
Writeln('With The Love Calculator you can calculate the probability of a successful');
Writeln('relationship between two people.');
Writeln('To find out what the chances for you and your dream partner are, just fill in');
Writeln('both names...');
Writeln('');
Writeln('');
Repeat
Writeln('               **************Please write your name************** ');Readln(Ch);
Writeln('               **************Now write your love''s name**************');Readln(Ch1);
i:=Length(Ch);
i1:=Length(Ch1);
M:=Length(Ch) Div 2;
M1:=Length(Ch1) Div 2;
 
If Ord(Ch[1]) > Ord(Ch1[1]) Then
Diff1:=Ord(Ch[1])-Ord(Ch1[1]);
If Ord(Ch1[1]) >=Ord(Ch[1]) Then
Diff1:=Ord(Ch1[1])-Ord(Ch[1]);
 
If Ord(Ch[m])>Ord(Ch1[m1]) Then
Diff2:=Ord(Ch[m])-Ord(Ch1[m1]);
If Ord(Ch1[m1])>Ord(Ch[m]) Then
Diff2:=Ord(Ch1[m])-Ord(Ch[m]);
 
If Ord(Ch[i])>Ord(Ch1[i1]) Then
Diff3:=Ord(Ch[i])-Ord(Ch1[i1]);
If Ord(Ch1[i1])>Ord(Ch[i]) Then
Diff3:=Ord(Ch1[i1])-Ord(Ch[i]);
 
Diff:=(Diff1+Diff2+Diff3) Div 3;
p:=(100-(4*Diff));
 
Writeln('The chance of a relationship working out between ',Ch,' And ',Ch1,' is ',Abs(p),'%');
Writeln('N''y croyez tout de même pas trop, c''est juste pour vous amuser');
 
Writeln('');
Writeln('Trie Again ? Press any key ');Readln(X);
Writeln('');
Until X='non';
End.