1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var current, past, sum: real;
i, n: integer;
begin
current : = 10;
for i : = 1 to 10 do begin
writeln(i, ' ', current);
past : = current;
current : = current * 1.1;
end;
current : = 10; sum : = 0;
write('n = ');
read(n);
for i : = 1 to n do begin
sum : = sum + current;
past : = current;
current : = current * 1.1;
end;
writeln('за ', n, ' дней: ', sum);
end.
#include <iostream>
using namespace std;
int main(){
float x,y,R;
cout<<"Vvedite a,b,R\n";
cin>>x>>y>>R;
if (x>=0 && x*x+y*y<=R*R)
cout<<"\nPopadaet\n";
else
cout<<"\nNe popadaet\n";
}
Тестовое решение:
Vvedite a,b,R
3
5
7
Popadaet
--------------------------------
Process exited after 15.45 seconds with return value 0
Для продолжения нажмите любую клавишу . . .
Vvedite a,b,R
4
-2
3
Ne popadaet
--------------------------------
Process exited after 27.79 seconds with return value 0
Для продолжения нажмите любую клавишу . . .