Две 1 что они будут плавать, а вторая что их дорожки 1 2 3
#include <math.h>
#include <cstdlib>
#include <iostream>
using namespace std;
float s(float a,float b,float c)
{
float S,p;
p=(a+b+c)/2;
S=sqrt(p*(p-a)*(p-b)*(p-c));
return S;
}
int main()
{
float a1=1.5,b1=1.5,c1=2.12,a2=1,b2=3,c2=3.15;
float s1,s2;
s1=s(a1,b1,c1);
s2=s(a2,b2,c2);
cout<<s1-s2<<endl;
system("PAUSE");
return 0 ;
}
Program z1;
var
a: integer;
c: byte;
begin
readln(a);
c:=0;
while a <> 0 do begin
c:=c + a mod 10;
a:=a div 10;
end;
writeln('Summa: ', c);
<span> end.</span>