Divisible by 4 (1-20) Problem
Divisible by 4 (1-20) Problem — ExecCode School DSA Practice
Solve the Divisible by 4 (1-20) problem on ExecCode. Free online school DSA practice in Loops. Write and run code in Java, C++, Python — no signup required to run.
Problem description
You are given the input needed to solve Divisible by 4 (1-20). Your task is to look at the numbers from 1 to 20. Print every number that can be divided by 4 with nothing left over. Put a space between each number.
Examples
Input ; Output 4 8 12 16 20. Input ; Output 4 8 12 16 20
Constraints
Range is fixed: 1 to 20.
Practice Divisible by 4 (1-20) free on ExecCode. Browse DSA problems, topic map, and placement guides.