Back
Close

Introduction à l'algorithmique

Zwifi
3,486 views

Bloc Si-Alors-Sinon

// {...}
Integer a = 5;
if(a>3){
System.out.println("Titi");
}
//{...}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// {...}
Integer a = 5;
Integer b = 3;
if(a==b){
System.out.println("Titi");
} else {
System.out.println("Toto");
}
//{...}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// {...}
Boolean ilPleut= false;
Boolean ilFaitFroid = false;
if(ilPleut){
System.out.println("Où est mon imper ?");
} else if (ilFaitFroid){
System.out.println("Un gros pull, un thé chaud et ça repart !");
} else {
System.out.println("J'ai mis une chemise à manche courtes, parce qu'il fait doux.");
}
//{...}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants