#!/usr/local/bin/perl $sum = 0; for $i (1 .. 999) { if(($i % 3) == 0){ $sum += $i; } else { if(($i % 5) == 0){ $sum += $i; } } } print $sum;
Post a Comment
No comments:
Post a Comment