Python:
sums = 0
for i in range(35,80):
sums += i
print(sums)
C++:
#include <iostream>
using namespace std;
int main() {
int sums=0;
for (int i = 35; i <= 79; i++) {
sums += i;
}
cout << sums;
return 0;
Pascal:
program pl;
var
i,sums:integer;
begin
for i := 35 to 79 do
sums := sums + i;
write(sums);
end.
Python:
sums = 0
for i in range(35,80):
sums += i
print(sums)
C++:
#include <iostream>
using namespace std;
int main() {
int sums=0;
for (int i = 35; i <= 79; i++) {
sums += i;
}
cout << sums;
return 0;
}
Pascal:
program pl;
var
i,sums:integer;
begin
for i := 35 to 79 do
sums := sums + i;
write(sums);
end.