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
Business Studies,
1 month ago
English,
1 month ago
Business Studies,
1 month ago
Math,
2 months ago
Hindi,
2 months ago
Political Science,
9 months ago
Math,
9 months ago
Hindi,
9 months ago