File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Correct output for this program? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Correct output for this program?" Watch "Correct output for this program?" New topic
Author

Correct output for this program?

Matt Kidd
Ranch Hand

Joined: Jul 17, 2002
Posts: 260
This is the program:

This is the output I came up with:
1
4
9
16
25
36
49
64
81
100
Total is 385
Am I correct?
[ August 08, 2002: Message edited by: Matt Kidd ]
Chad McGowan
Ranch Hand

Joined: May 10, 2001
Posts: 265
You are correct. You could have found this out by running the program yourself!
Matt Kidd
Ranch Hand

Joined: Jul 17, 2002
Posts: 260
mental note....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Correct output for this program?