For your homework, write a program that outputs all the multiples of three less than or equal to a given number. Use a scanner to input the given number.
import java.util.Scanner;class Main {public static void main(String[] args) { Scanner sc = new Scanner(system.in);int number = sc.nextln;for (int i = 1, i => number, i = i + 3); System.out.nextln(i*3); }}
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(system.in); int number = sc.nextln; for (int i = 1, i => number, i = i + 3); System.out.nextln(i*3); } }