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 original price of a computer was $1250. At a year in sale the selling price of the computer was $900. Find the percent discount.
Is 4/5 and 20/25 equivalent?
why is the 16th amendment significant? It gave Congress the authority to enforce income tax. It prohibited the direct election of US senators by voters. It allo
If $5700 is invested at a 5% annual simple interest, how much should be invested at 9% annual simple interest so that the total yearly income from both investme
Why is the radius of a positive ion always less than the radius of its neutral atom? (A) the nucleus pulls the remaining electrons in closer. (B) The number
Help me on this problem please
Which statements correctly describe characteristics of the Maya's civilization? Choose all answers that are correct. A. accepted monotheism before other America
Which of the following statements best describes the use of the term “new world”? A. "New world" referred to the expanded understanding of the Earth''s landmass
words in context find words 1-7 in the text and match them with the correct definitions a-g 1 rescue (n) 2 join 3 shout (n) 4 condition 5 crew 6 keep fit 7
Solving system by elimination 7x+2y=24 8x+2y=30