Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String args []){
- int a = in.nextInt();
- int b = in.nextInt();
- int c = in.nextInt();
- int x;
- System.out.println("Числа в переменных a, b и c : " + a + " " + b + " " + c);
- if (a > b) {
- x = a; a = b; b = x;
- }
- if (b > c){
- x = b; b = c; c = x;
- }
- System.out.println("Возрастающая последовательность: " + a + " " + b + " " + c);
- }
- public static void main(String args []){
- int a = in.nextInt();
- int b = in.nextInt();
- int c = in.nextInt();
- int x;
- System.out.println("Числа в переменных a, b и c : " + a + " " + b + " " + c);
- if (a > b) {
- x = a; a = b; b = x;
- }
- if (b > c){
- x = b; b = c; c = x;
- }
- System.out.println("Возрастающая последовательность: " + a + " " + b + " " + c);
- }
- public static void main(String[] args) {
- int a = in.nextInt();
- int b = in.nextInt();
- int c = in.nextInt();
- int x;
- if (a > b) {
- x = a; a = b; b = x;}
- else a = a;
- if (b > c){
- x = b; b = c; c = x;}
- else b=b;
- if (a > b) {
- x = a; a = b; b = x;}
- else c= c;
- System.out.println("Возрастающая последовательность:" + a + " " + b + " " + c);
- }
- }
- int[] array = {a, b, c};
- var min = array[0];
- for (var i; i < 3; i++)
- {
- if (min > array[i])
- min = array[i]
- }
- public static void main(String args []){
- int a = in.nextInt();
- int b = in.nextInt();
- int c = in.nextInt();
- int min = Math.min(Math.min(a,b),c)
- int max = Math.max(Math.max(a,b),c)
- b = (a + b + c) - min - max; a = min; c = max;
- System.out.println("Возрастающая последовательность: " + a + " " + b + " " + c);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement