write an algorithm to display numbers from 40 to 30
Answers
Answered by
1
Explanation:
i
We can start off by initializing 2 integer variables, ‘a’ and ‘sum’.
Let a = 1
Let sum = 0
.
for(i = 1; i <= 50; i++):
sum += i;!
Let i = 50
Let sum = 0
sum += i⋅ (i+1)2i⋅ (i+1)2;
return sum;
Let i = 50 (terminal value)
Let s = 1 (starting value)
m = i2i2
sum += (i+s)⋅ m(i+s)⋅ m
return sum;
Similar questions
Math,
4 months ago
Hindi,
4 months ago
Political Science,
10 months ago
Math,
10 months ago
Hindi,
10 months ago