Skip to content

Instantly share code, notes, and snippets.

@ZhdanRuslan
Created April 24, 2015 20:17
Show Gist options
  • Save ZhdanRuslan/b3fb032c96a5cdecd0ca to your computer and use it in GitHub Desktop.
Save ZhdanRuslan/b3fb032c96a5cdecd0ca to your computer and use it in GitHub Desktop.
level09.lesson11.home02
package com.javarush.test.level09.lesson11.home02;
/* Обратный отсчёт от 10 до 0
Написать в цикле обратный отсчёт от 10 до 0. Для задержки иcпользовать Thread.sleep(100);
Обернуть вызов sleep в try..catch.
*/
public class Solution
{
public static void main(String[] args)
{
for (int i = 10; i >= 0; i--)
{
System.out.println(i);
try {
Thread.sleep(100);
} catch (InterruptedException e)
{
e.printStackTrace();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment