public class q1 { public static void main(String[] args) { int i = 1; int sum = 0; while (i<=100){ sum+=i; i++; } System.out.println(sum); } }
public class q2 { public static void main(String[] args){ int i = 1; int sum = 0; while (i<=100){ if (i % 10==0); sum+=i; i++; } System.out.println(sum); } }
public class q3 { public static void main(String[] args) { int i = 1; int sum =0; while (i<=100){if (i%2 ==0) sum+=i; i++; } System.out.println(sum); } }
public class q4 { public static void main(String[] args) { int i =1; int sum = 0; while (i<=100){if (i%10 ==0) sum+=i; i++; } System.out.println(sum); } }
public class q5 { public static void main(String[] args) { int i =1; int sum = 0; int sym = 0; int cha = 0; while (i<=100){if (i%2 ==0) sum+=i; if (i%2!=0) sum+=i; i++; } } }
public class q6 { public static void main(String[] args) { int i =1; int sum = 0; while (i<=100){if (i%5 ==0) sum+=i; i++; } System.out.println(sum); } }
public class q7 { public static void main(String[] args) { int i =1; int sum = 0; while (i<=100){if (i%2 ==0) sum+=i; i++; } System.out.println(sum); }}
public class q8 { public static void main(String[] args) { int i =1; int fsz =0; int osz =0; int sum =0; while (i<=100){if (i%5 ==0) fsz+=i; if (i%4 ==0) osz+=i; i++; sum=fsz+osz; } System.out.println(sum); }}
public class q9 { public static void main(String[] args) { int i = 1; int tfs = 0; while (i <= 100) { if (i % 2 != 0) { if (i % 3 ==0) tfs += i; } i++; System.out.println(tfs); } }
public class q10 { public static void main(String[] args) { int i = 1; int tfs = 0; while (i <= 100) { if (i % 2 != 0) { if (i % 8 ==0) tfs += i; } i++; System.out.println(tfs); } } }