Ответ:
С++
#include <iostream>
using namespace std;
int main()
{
int S = 0;
int a = 1;
while(a <= 10)
S = S + a;
a = a + 1;
}
cout << S;
return 0;
55
Объяснение:
program z;
var S,a:integer;
begin
S:=0;
for a:=1 to 10 do S:=S+a;
write(S)
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
С++
#include <iostream>
using namespace std;
int main()
{
int S = 0;
int a = 1;
while(a <= 10)
{
S = S + a;
a = a + 1;
}
cout << S;
return 0;
}
Verified answer
Ответ:
55
Объяснение:
program z;
var S,a:integer;
begin
S:=0;
for a:=1 to 10 do S:=S+a;
write(S)
end.