#!/bin/bash
echo -n "nhap n: "
read n
for ((i=0; i<n; i++))
do
read -p "a[$i]= " a[$i]
done
max=${a[0]}
for ((i=1; i<n; i++))
do
if [ ${a[$i]} -gt $max]; then
max=${a[$i]}
fi
done
echo "gia tri lon nhat la: $max"
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment