Horje
shell script to find sum of n numbers using for loop Code Example
shell script to find sum of n numbers using for loop
#shell script to find sum of n numbers using for loop
  
echo "Enter Size(N)"
read N

sum=0

echo "Enter Numbers"
for((i=1;i<=N;i++))
do
  read num           #get number
  sum=$((sum + num)) #sum+=num
done

echo $sum




Shell

Related
Error: Error parsing triggers: Cannot find module '@babel/runtime/helpers/interopRequireDefault' Code Example Error: Error parsing triggers: Cannot find module '@babel/runtime/helpers/interopRequireDefault' Code Example
git checkout specific file types Code Example git checkout specific file types Code Example
powershell try catch connect-viserver Code Example powershell try catch connect-viserver Code Example
Install Mapproxy Code Example Install Mapproxy Code Example
how do I add a commit to an existing pull request Code Example how do I add a commit to an existing pull request Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9