program z3;
var x1,x2,x3,y1,y2,y3,ac,ab,bc,a1,b1:real;f,f1:text;
begin
assign (f, 'z1.dat');
rewrite(f);
readln(x1,y1);
readln(x2,y2);
readln(x3,y3);
writeln(f,x1,y1);
writeln(f,x2,y2);
writeln(f,x3,y3);
close(f);
ac:=sqr(x1-x3)+sqr(y1-y3);
ab:=sqr(x2-x1)+sqr(y2-y1);
bc:=sqr(x3-x2)+sqr(y3-y2);
b1:=(ab+bc-ac)/(2*sqrt(ab*bc));
a1:=(ac+ab-bc)/(2*sqrt(ac*ab));
if (a1 < 0) or (b1 < 0) then
assign(f1, 'z1.rez');
rewrite(f1);
writeln('na prodolzenue');
writeln(f1,'na prodolzenue');close(f1)
end
else
writeln ('na otrezke');
writeln(f1,'na otrezke');
close(f1)
end.
#include <iostream>
using namespace std;
int main()
{
int number;
cout << "Input number: ";
cin >> number;
switch(number)
case 1:
cout << "Monday";
break;
case 2:
cout << "Tuesday";
case 3:
cout << "Wednesday";
case 4:
cout << "Thursday";
case 5:
cout << "Friday";
case 6:
cout << "Saturday";
case 7:
cout << "Sunday";
default:
cout << "Input error!";
return 1;
}
return 0;
program z3;
var x1,x2,x3,y1,y2,y3,ac,ab,bc,a1,b1:real;f,f1:text;
begin
assign (f, 'z1.dat');
rewrite(f);
readln(x1,y1);
readln(x2,y2);
readln(x3,y3);
writeln(f,x1,y1);
writeln(f,x2,y2);
writeln(f,x3,y3);
close(f);
ac:=sqr(x1-x3)+sqr(y1-y3);
ab:=sqr(x2-x1)+sqr(y2-y1);
bc:=sqr(x3-x2)+sqr(y3-y2);
b1:=(ab+bc-ac)/(2*sqrt(ab*bc));
a1:=(ac+ab-bc)/(2*sqrt(ac*ab));
if (a1 < 0) or (b1 < 0) then
begin
assign(f1, 'z1.rez');
rewrite(f1);
writeln('na prodolzenue');
writeln(f1,'na prodolzenue');close(f1)
end
else
begin
assign(f1, 'z1.rez');
rewrite(f1);
writeln ('na otrezke');
writeln(f1,'na otrezke');
close(f1)
end
end.
#include <iostream>
using namespace std;
int main()
{
int number;
cout << "Input number: ";
cin >> number;
switch(number)
{
case 1:
cout << "Monday";
break;
case 2:
cout << "Tuesday";
break;
case 3:
cout << "Wednesday";
break;
case 4:
cout << "Thursday";
break;
case 5:
cout << "Friday";
break;
case 6:
cout << "Saturday";
break;
case 7:
cout << "Sunday";
break;
default:
cout << "Input error!";
return 1;
}
return 0;
}