Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main(){
- List<int> list = [10, 20, 30, 40, 50];
- int sum = 0;
- //Advanced for loop
- for( int num in list) {
- sum = sum+num;
- }
- print("Jumlah Dari Semua Elemen Array Adalah: $sum");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement