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
|
import java.util.Scanner;
public class Testing
{
public static void main(String[] args)
{
char reponse='0';
do{
System.out.println("Entrez score A:");
Scanner valeur=new Scanner(System.in);
int A=valeur.nextInt();
System.out.println("Entrez score B:");
int B=valeur.nextInt();
System.out.println("Entrez score C:");
int C=valeur.nextInt();
System.out.println("Entrez score D:");
int D=valeur.nextInt();
if(A>50)
{
System.out.println("Elu au premier tour A:");
}
else if((B>50||C>50||D>50)||(A>=12))
{
System.out.println("Battu, éliminé, sorti!!!:");
}
else if(A>=B & A>=C & A>=D )
{
System.out.println("Ballotage favorable:");
}
else
{
System.out.println("Ballotage défavorable:");
}
System.out.println("Voulez vous reessayer,(O/N");
Scanner sc=new Scanner(System.in);
reponse=sc.nextLine().charAt(0);
}
while(reponse=='O');
System.out.println("Au revoir...");
}
} |