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

help is the relationship linear, exponential, or neither?
"If you were traveling in time and had a choice to land on a time and place in Asia, where, or what country, would it be? What part of that country would you li
Thanks to the efforts of a number of inventors, the Industrial Revolution began in England's textile industry. Who invented the flying shuttle which allowed wea
Please help-w/ steps
Place the events in the chronological order that correctly shows the cause and effect of how the Cuban Missile Crisis started and escalated. 1 Kennedy issues a
How does a fiber-optic cable send information quickly over long distances?.
Social media has brought an entirely new dimension to information about health. Unfortunately, much of the information on social media is not accurate and much
Write the expanded form, for 34.75
120% of x is equal to 78. A. Write an equation that shows the relationship of 120%, x, and 78. B. Use your equation to find x. Show your reasoning. It be great
Which word doesn't show onomatopoeia? Pow! screech walk ruff, ruff