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

Round 3.047 to the nearest 100th
A security camera rotates 30° every 10 seconds. How long does it take the camera to rotate 360°?
t=pd/2xsolve for Xi always get confused when theirs more then one letter
t=pd/2xsolve for Xi always get confused when theirs more then one letter
what is -126=14K solution
There were 28 white ducks swimming in a pond. • Twice as many brown ducks flew in and landed in the pond. • Then half of the white ducks flew away. How many
j+18/-4=8 equals what?
The atomic number of nitrogen is 7. The atomic mass is 14.01. What can we deduce from this ?
student A poured 50/100 liter of water into a bowl. Susan poured 3/10 liter of water into the same bowl. What was the total amount of water the girls poured i
Find surface area of a rectangle