Part 1
Chapter 1
: Les variables
Introduction
Types de données
Support de cours n°1
Synthèse n°2
Les chaines de caractères
Example PHP n°1
Example PHP n°2
Synthèse n°3
Example PHP n°4
Example PHP n°5
Exercice PHP n°6
Exercice PHP n°7
Les entiers
Support de cours n°1
Example PHP n°2
Exercice PHP n°3
Exercice PHP n°4
Les réels
Support de cours n°1
Example PHP n°2
Exercice PHP n°3
Les booleens
Support de cours n°1
Example PHP n°2
Exercice PHP n°3
Chapter 2
: Les conditionnelles
La conditionnelle if else
Support de cours n°1
Example PHP n°2
Example PHP n°3
Example PHP n°4
Example PHP n°5
La conditionnelle switch
Support de cours n°1
Example PHP n°2
Conditionnelles synthèse
Conditionnelles exercices
Exercice PHP n°1
Exercice PHP n°2
Exercice PHP n°3
Exercice PHP n°4
Chapter 3
: Les boucles
La boucle for
Support de cours n°1
Example PHP n°2
Example PHP n°3
La boucle while
Support de cours n°1
Example PHP n°2
do while
Support de cours n°1
Example PHP n°2
Boucle synthèse
Boucles exercices
Exercice PHP n°1
Exercice PHP n°2
Exercice PHP n°3
Example PHP n°4
Chapter 4
: Les tableaux
Les tableaux
Support de cours n°1
Example PHP n°2
Example PHP n°3
Support de cours n°4
Example PHP n°5
Example PHP n°6
Support de cours n°7
Example PHP n°8
Tableaux Synthèse
Tableaux exercices
Exercice PHP n°1
Exercice PHP n°2
Exercice PHP n°3
Exercice PHP n°4
Exercice PHP n°5
Exercice PHP n°6
1
Les réels : Example PHP n°2
The questions should help you understand the code shown below.
Once you hold the solution, you can view the answer by clicking on the question title.
1.Comment ecrit on un nombre avec un exposant ?
R : Pour écrire un nombre avec un exposant on utilise le caractère e pour séparer l'exposant. Ainsi 8e-5 correspond au chiffre : 0.00008
$nb1=3.1415;
$nb2=8e-5;
print('<p>Le premier nombre réel est initialisé à :'. $nb1.'</p>');
print ('<p>Le type de $nb1 est '.gettype($nb1).'</p>');
print('<p>Le deuxieme nombre réel est initialisé à :'. $nb2.'</p>');
print ('<p>Le type de $nb2 est '.gettype($nb2).'</p>');
print('<p>Double designe un nombre réel</p>');
Result :
Le premier nombre réel est initialisé à :3.1415
Le type de $nb1 est double
Le deuxieme nombre réel est initialisé à :8.0E-5
Le type de $nb2 est double
Double designe un nombre réel
<p>Le‧premier‧nombre‧réel‧est‧initialisé‧à‧:3.1415</p><p>Le‧type‧de‧$nb1‧est‧double</p><p>Le‧deuxieme‧nombre‧réel‧est‧initialisé‧à‧:8.0E-5</p><p>Le‧type‧de‧$nb2‧est‧double</p><p>Double‧designe‧un‧nombre‧réel</p>
Execution in 0.0005s