#!/bin/bash
for i in {1..100};do
a2=$(($i % 2))
a3=$(($i % 3))
if test $a2 -eq 0 -a $a3 -eq 0 ;then
echo "$i能被2和3整除"
fi
done
2と3で割ることができる1-100の数
おすすめ
転載: blog.51cto.com/12723336/2588368
おすすめ
ランキング