Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- public class Main {
- public static void main(String[] args) {
- int sum = 0;
- for (int i = 3; i <= 99; i = i + 1) {
- if (i % 3 == 0) {
- sum = sum + i;
- }
- }
- System.out.println(sum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement