javaprograms

javaprograms

write a program s=12+22+32+.........+352

View Answers

September 9, 2011 at 4:16 PM

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);
    }
}









Related Tutorials/Questions & Answers:
javaprograms
javaprograms
Advertisements
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms
javaprograms - Java Beginners
javaprograms - Java Beginners
javaprograms - Java Beginners

Ads