-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathSwap3.java
More file actions
39 lines (28 loc) · 1.14 KB
/
Copy pathSwap3.java
File metadata and controls
39 lines (28 loc) · 1.14 KB
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
import java.util.Scanner;
class Swap3 {
private static Scanner clavier = new Scanner(System.in);
public static void main(String[] args) {
System.out.print("Entrez la premiere valeur : ");
int a = clavier.nextInt();
System.out.print("Entrez la deuxieme valeur : ");
int b = clavier.nextInt();
System.out.print("Entrez la troisieme valeur : ");
int c = clavier.nextInt();
System.out.println("Les valeurs entrees sont : a = " + a
+ ", b = " + b + " et c = " + c);
System.out.println("Permutation: a ==> b, b ==> c, c ==> a");
/*******************************************
* Completez le programme a partir d'ici.
*******************************************/
int temp;
temp = b;
b = a;
a = c;
c = temp;
/*******************************************
* Ne rien modifier apres cette ligne.
*******************************************/
System.out.println("Les valeurs permutees sont : a = " + a
+ ", b = " + b + " et c = " + c);
}
}