Commit 369ad788 authored by Timofey's avatar Timofey

Add new file

parent a8902246
#!/bin/bash
print_random()
{
MAXCOUNT=$1
count=1
# count <= MAXCOUNT
while [ "$count" -le $MAXCOUNT ] ; do
number=$RANDOM
echo $number
let "count += 1"
done
echo "Случайных чисел сгенерировано: $MAXCOUNT"
}
if [ "$1" = "-h" ] ; then
echo -n "Доступные параметры: -n"
echo
exit
elif [ "$1" = "-n" ] ; then
number=$2
else
echo -n "Введите количество случайных чисел:"
read number
fi
print_random $number
echo
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment