write a program s=12+22+32+.........+352
class NumberExample { public static void main(String[] args) { int sum=0; int m=0; for(int i=12; i<=352; i+=10){ System.out.print(i+" "); sum+=i; } System.out.println(); System.out.println("Sum of series: "+sum); } }
Ads