Respuesta :
The pseudocode to find the sum of all integers that are multiples of 9, from 1 to 250.
totalSum = 0
for i from 1 to 250{
if i is divided by 9 and remainder is 0{
totalSum = totalSum + i;
}
}
print(totalSum)
in python language the code will be
totalSum = 0
for i in range(1,250):
if i%9==0:
totalSum += i
If you will run the program , the answer would be 3402.
Answer:
To find the sum of all integers that are multiples of 9 from 1 to 250, first initialize the total sum with zero (0). After this, define for loop from 1 to 250 so that all the integers from 1 to 250 will be checked. Now, define the condition if the number is divisible by 9 or not. If number is divisible by 9 then add the integer with total sum. This process continues till the number 250. Thus, the total sum is the sum of the multiples of 9 from 1 to 250.
Further Explanation:
Following is the python program to calculate sum of the multiples of 9 from 1 to 250.
Code:
sum = 0
for i in range(1,250):
if i%9==0:
sum = sum+ i
Learn more:
1. A company that allows you to license software monthly to use online is an example of ? brainly.com/question/10410011
2. Prediction accuracy of a neural network depends on _______________ and ______________. brainly.com/question/10599832
3. The shape of our galaxy was determined ‘on the inside looking out' by surveying the milky way using ____________ telescopes. brainly.com/question/7866623
Answer details:
- Grade: Middle School
- Subject: Computers and Technology
- Chapter: Python Programming
Keywords:
Python, JAVA, C++, C, compute, sum, all integers, multiples of 9, from 1 to 250, result, text box, below, sum, range