lak521
lak521 lak521
  • 13-04-2021
  • Computers and Technology
contestada

NO LINKS
write a shell script to find the sum of all integers between 100 and 200 which are divisible by 9​

Respuesta :

tonb
tonb tonb
  • 13-04-2021

Answer:

#!/usr/bin/env bash

for num in {100..200}

do

   if [ $((num % 9)) -eq 0 ]

   then

       ((sum += num))

   fi

done

echo $sum

Explanation:

The output will be 1683.

Answer Link

Otras preguntas

The strongest voice in shaping foreign policy belongs to __________.
Animals without a backbone are classified as ________. crustaceans invertebrates arthropods worms
The system of equations is inconsistent. What are the missing values? Y=2/3x + 3 Y=__/__x + 5 Fill in the blanks
Help Please!!!!!!!!!!! A laser printer prints 360 pages in 30 minutes. What is the printing rate in pages per minute?
How often is water added to the Earth system?
what should an operator do when attempting to re-board a personal watercraft (PWC)?
Are pencils biotic or abiotic because its not living but it was made out of wood which was a live
Tonya runs 8 kilometres in 60 minutes. At a rate how long would it take her to run 2 kilometers
La ce distanta de la suprafata Pamintului intensitatea cimpului sau gravidational este egala cu 1 N/kg ? Va rooogggg .. ofer 21 puncte !!!
traits that improve an organism chance for survival