1)public class Ex6_7do{public static void main(String args[]){int i = 1, sum = 0;do{if ((i % 3) == 0) sum += i;i++;}while (i < 100);System.out.println("sum=" + sum);}}2)public class Ex6_7for{public static void main(String args[]){int i, sum = 0;for (i...
int sum = 0;int i;for (i=1;i<=100;i++){ sum += i * i;} printf("sum = %d\n", sum);
1) public class Ex6_7do { public static void main(String args[]) { int i = 1, sum = 0; do { if ((i % 3) == 0) sum += i; i++; } while (i < 100); System.out.println("sum=" + sum); } } 2) public class Ex6_7for { public static void main(String args[]) ...