Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class sum{
- public static void main(String[] args) {
- double[] array = {1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.1};
- double sum = 0;
- for (int i=0; i<array.length; i++) {
- sum+= array[i];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement