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

Language too ok cause I need help with that to
"Women in the nineteenth century had the responsibilities but not the rights of citizenship." Which statement supports this claim? A. Women had to serve on jur
what is 42/56 in simplest form?
Australians stopped using one-cent coins in 1992. Ever since, when they make a purchase, the price is rounded to the nearest five cents. How much money must be
As you travel up into the mountains, why do your ears pop
At the football game, the Pep Club sold a total of 12 liters of fruit punch in 2 hours. The same amount of fruit punch was sold each hour. How many liters of fr
It takes 6 hours to travel 372 miles how many hors will it take to travel 279
A bike race takes place over a 3 mile course.How many feet is it
how do you simplify 7 (2x+10) thanks in advance
why is aluminum a substance