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

Given that JKL = UVW and UVW= ABC , complete the following statements triangle Jkl is congruent to triangle?
A chemist has two alloys, one of which is 5% gold and 20% lead and the other which is 30% gold and 50% lead. How many grams of each of the two alloys should be
Sam ran 63,756 feet in 70 minutes. What is Sam's rate in miles per hour? (There are 5,280 feet in one mile.)
The giant panda is descended from carnivorous ancestors. however, meat became scarce in the giant panda's environment. today, giant pandas eat meat when it is a
Accounts receivable analysis a company reports the following: sales $315,360 average accounts receivable (net) 39,420 determine (a) the accounts receivable turn
How is historical evidence useful to a historian?
Which of the following is NOT a possible tax or deduction that could be withdrawn from your paycheck? Restaurant tax Federal income tax FICA Contributions to re
How does Daniel’s relationship with Brian begin for pleasure of my company?
find the radius, please help asap due tuesday
Theodore Roosevelt the twenty-sixth president of the United States was the youngest president to ever hold office. Which revision of the sentence is now properl