006-004-005

Do-While Loop: Countdown

Easy

Problem Description

Do-While Loop: Countdown

Learning Objective: Understand that do-while executes at least once

Overview

The do-while loop checks condition after execution, so the loop body always runs at least once. Let's create a countdown from 3!

Specifications

  • Initialize variable count to 3
  • Use do-while for countdown
  • Display current number each iteration
  • Repeat while count is greater than 0
  • Display "Done!" at the end

Output Format

3
2
1
Done!

Test Cases

※ Output examples follow programming industry standards

Input:
Expected Output:
3
2
1
Done!
❌ Some tests failed
❌ エラー発生

Your Solution

Current Mode: My Code
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here

sc.close();
}
}
0 B / 5 MB

You have 9 free executions remaining