1) var a,b,a1,b1:real; var s,s1:real; begin WriteLn('Введите все катеты через пробел:'); Read(a,b,a1,b1); s:=a/2*b; s1:=a1/2*b1; WriteLn(s); WriteLn(s1); if s = s1 then WriteLn('Треугольники равновелики') else if s>s1 then WriteLn('Площадь первого треугольника больше на '+(s-s1)) else WriteLn('Площадь второго треугольника больше на '+(s1-s)); end.
2) var a,b:Integer; var arr:array of char; begin arr:=ReadString().ToCharArray(); for var i:= 1 to 6 do if(i<4) then a+= strtoint(arr[i-1]) else b+= strtoint(arr[i-1]); if a=b then WriteLn('Билет счастливый') else WriteLn('Билет не счастливый'); end.
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <cstring>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <climits>typedef unsigned long long ulol;
typedef long double ld;
typedef long long lol;
typedef long int li;#define mp make_pair
#define F first
#define S second
#define sqr(a) ( (a) * (a) )
#define pb push_back
#define INF 999999999
#define ret(a) cout << endl; system("pause"); return(a)
//#define ret(a) return(a)using namespace std;int main()
{
ld x;
cin >> x;
x = ( 8 / sqrt( x ) ) + sqrt(x);
cout << x;
ret(0);
}