Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package PreSession_05;
- public class p4_1b {
- public static void main(String[] args) {
- int total = 0;
- int count = 1;
- while (count <= 100) {
- total = total + (count * count);
- count += 1;
- }
- System.out.println("Total = "+total);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement