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

find the midpoint between each (8, -9) and (8, 5)
How do you work out perimeter of a trapezium
how do you answer this question y = 9 - 5x                                                         -3 = x
345 ft/min = ___________ ft/h
I need examples of cultural diffusion and why
The distance between Earth and its moon is 3.84 × 108 meters. Earth’s mass is m = 5.9742 × 1024 kilograms and the mass of the moon is 7.36 × 1022 kilograms. Wh
write 103,727,495 in expanded form
What is 6.82 as a mixed number in simplest form?
Theo had a balance of -4 in his savings account. After making a deposit , he has $25 in his account . What is the overall change to his account ?
Find the height h of the parallelogram.