Répondre :
Réponse :
Bonjour,
1.a) [tex]\texttt{ > > > caclul(1, 2)}[/tex]
[tex]\texttt{4.0}[/tex]
Justification:
Pour A = 1 et B = 2
C = (A + B)² = (1 + 2)² = 3² = 9
D = (A – B)² = (1 – 2)² = (-1)² = 1
E = C – D = 9 – 1 = 8
F = E/(A × B) = 8/(1 × 2) = 8/2 = 4
1.b) [tex]\texttt{ > > > caclul(5, 7)}[/tex]
[tex]\texttt{4.0}[/tex]
Justification:
Pour A = 5 et B = 7
C = (A + B)² = (5 + 7)² = 12² = 144
D = (A – B)² = (5 – 7)² = (-2)² = 4
E = C – D = 144 – 4 = 140
F = E/(A × B) = 140/(5 × 7) = 140/35 = 4
2) On remarque que pour tout réel A et B choisis, le programme renvoie toujours le nombre 4 comme sortie.
3) Dans le cas général:
C = (A + B)² = A² + 2AB + B²
D = (A – B)² = A² – 2AB + B²
E = C – D
= A² + 2AB + B² – (A² – 2AB + B²)
= A² + 2AB + B² – A² + 2AB – B²
= 4AB
F = E/(A × B)
= (4AB)/(AB)
= 4 d'où la conjecture.