Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main
- {
- public static void main(String[] args) {
- double N = 5;
- double K = 50;
- double summary = 0;
- double temp = K;
- for(int i = 0 ; i < N ; i++) {
- summary += temp;
- temp += K;
- }
- System.out.print(summary);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement