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

This natural resource is present in large amounts in Britain, France, and Germany iron coal oil natural gas
what common between the northeast southeast region?
ex 2.11 20) A curve y''=12x-24 and a stationary point at (1,4). evaluate y when x=2.
True or false? After liberation, Latin Americans faced political chaos. This allowed military strongmen to rise to power. A. True B. False
Find the area of a square cornfield that is 2 km long on each side. A. 2 km B. 2 km2 C. 4 km D. 4 km2 plz help!
? What was the main aim of the Northwest Ordinance of 1787? to pay off the national debt to empower Congress to auction surplus land to stipulate how new states
What were congressmen who supported war with England in 1812 called? A. Democratic-Republicans B. Doves C. War Hawks D. Federalists
Which of the following quotes best reflects the principle of popular sovereignty in the Declaration of Independence? (3 points)
What is the slope of a line perpendicular to the line whose equation is 2y=-6x+8 1)-3 2)1/3 3)1/6 4)-6
What two groups in ancient India challenged Brahmanism, and why?