import java.util.Scanner; public class LoopDiv { public static void main(String[] args) { // how would you print numbers from 1 to n but only those divisile by 10 // and sum them 10 + 20 + ... + n System.out.println("Enter a positive number"); int n = ITI1120.readInt(); int count = 1; int sum = 0; // from 1 to n while(count <= n) { if (count % 10 == 0) { System.out.println(count); sum = sum + count; } count = count + 1; } System.out.println("The sum is "+sum); } }