Date created: Sunday, July 10, 2011 7:00:11 PM. Last modified: Saturday, August 6, 2016 10:12:45 PM
#!/bin/bash# Project Euler - Problem 1 - Revisedtarget=999sum=0for ((i=1;i<=$target;i++))do if [ `expr $i % 3` -eq 0 ] || [ `expr $i % 5` -eq 0 ] then sum=$(($sum + $i)) fidoneecho $sum
^ Top
Previous page: Problems Next page: Problem 2