About this document
Looping in Java: Summation Example by Mohit Kvs is a document available to read on EtoBox.
This code uses a while loop to iterate from 1 to 15, incrementing the variable p each time and adding it to the running total s. It prints out the value of p each iteration and the final value of s after the loop completes, which is 63.
- Author
- Mohit Kvs
- Language
- EN