sum of the series.

PHOTO EMBED

Fri Apr 23 2021 18:49:48 GMT+0000 (UTC)

Saved by @ahmedqgqgq #java

import java.util.Scanner;
public class Ok {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        float num = input.nextFloat();
        float sum = 0;
        for (float i = 0; i <= 28; i++) {
            sum = sum + num;
            num = num + 0.07f;
            System.out.printf("The num=:%f", num);
            System.out.println();
        }
        System.out.println("The sum of series:" + (int) sum);
    }
}

content_copyCOPY