#include <iostream>
using namespace std;
int main()
{
float x, y, c;
cin>>x>>y;
if (x>y)
{
c = x;
x = 2*x*y;
y = (c+y) / 2.0;
cout<<"x>y"<<endl;
}
else
{
c = x;
x = (x+y)/2.0;
y = 2*c*y;
cout<<"x<y"<<endl;
}
cout<<"x = "<<x<<endl;
cout<<"y = "<<y<<endl;
system("pause");
return 0;
}
Нельзя более 5000 символов, поэтому просто дам ссылку http://school-25.ru/informatika/uch_8kl_sem/04.html
//PascalABC.NET 3.3.5.1644
var c, d, x, y: real;
begin
c := 2;
d := -2.5;
x := 2;
y := ( ( tan(x)/ln(x) ) + (x/c) ) / abs( d * x );
writeln('При x = ', x, ', y = ', y);
x := 3;
y := ( ( tan(x)/ln(x) ) + (x/c) ) / abs( d * x );
writeln('При x = ', x, ', y = ', y);
end.
Var
i,s:integer;
begin
i:=1; s:=0;
while i<=99 do
begin s:=s+i; i:=i+2 end;
Writeln(s)
end.
Тестовое решение:
2500
Циклом делаешь просто y раз к x прибавляешь x