Answer:
#include <iostream>
using namespace std;
int main() {
int i,lo=12,hi=45,result=0;//all the variables declared..
for(i=lo;i<=hi;i++)//for loop.
{
result+=i;//adding integers to sum..
}
cout<<result<<endl;//printing the result.
return 0;
}
Output:-
969
Step-by-step explanation:
The above-written program is in C++.The variables i,lo,hi,result are declared first only lo,hi,result are initialized.Then a for loop is used to iterate over the values from lo to hi for that i used and the value of every integer is added to the result.