public class Solution
    public static void main(String[] args) throws Exception
        //add your code here
        BufferedReader reader=new BufferedReader(new InputStreamReader(;
        int[] lista=new int[10];

        //fill array with int values from keyboard
        for (int i=0; i<lista.length; i++) {
        // sort array
        boolean sorted=false;
    while (!sorted) {
        for (int i=0; i<(lista.length-1); i++) {
            if (lista[i]<lista[i+1]) {
                int temp = lista[i];
        //display sorted array
        for (int i=0; i<lista.length; i++) {

I have no idea why this one does not pass the test. I hate the fact that it's only 10 levels avilable and I'm already in 7th. This is the best course ever!!!! I helped myself reading next lesson. I understood the task wrong. It didn't mean to sort the numbers descending and display it but just to arrange the elements in reverse order as they were input (the last element goes first, the second from end becomes secont etc).

asked 29 Dec '17, 15:10

spike's gravatar image

accept rate: 0%

edited 31 Dec '17, 11:02

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 29 Dec '17, 15:10

Seen: 47 times

Last updated: 31 Dec '17, 11:02