Préparation pour test intermediaire
- Analyseur lexical OK - Analyseur syntaxyque OK
This commit is contained in:
23
test/input/max.l
Normal file
23
test/input/max.l
Normal file
@@ -0,0 +1,23 @@
|
||||
max( entier $a, entier $b )
|
||||
{
|
||||
si $a < $b alors {
|
||||
retour $b;
|
||||
}
|
||||
retour $a;
|
||||
}
|
||||
|
||||
main()
|
||||
entier $v_1, entier $v_2;
|
||||
{
|
||||
$v_1 = lire();
|
||||
$v_2 = lire();
|
||||
si max( $v_1, $v_2 ) = $v_1 alors
|
||||
{
|
||||
ecrire( $v_1 );
|
||||
}
|
||||
sinon
|
||||
{
|
||||
ecrire( $v_2 );
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user