Sum numbers divisible by 3

Java Easy 5 views
Back to Questions
Next Count digits in a number Easy N

Problem Description

Task: return sum of numbers from 1..n that are divisible by 3. Use loop and if condition.

Input Format

Java method

Output Format

Return value

Constraints

n can be 0.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Next