Sanlover

Untitled

Oct 18th, 2021
835
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. public class Main
  3. {
  4.     public static void main(String[] args) {
  5.         double N = 5;
  6.         double K = 50;
  7.         double summary = 0;
  8.         double temp = K;
  9.         for(int i = 0 ; i < N ; i++) {
  10.             summary += temp;
  11.             temp += K;
  12.         }
  13.        
  14.         System.out.print(summary);
  15.     }
  16. }
  17.  
RAW Paste Data