#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <ctime>
using namespace std;
int main()
{
int y;
char buffer[80];
cout << "Year = ";
cin >> y;
tm time_in;
time_in.tm_sec = 0; // second
time_in.tm_min = 0; // minute
time_in.tm_hour = 0; // hour
time_in.tm_mday = 1; // 1-based day
time_in.tm_mon = 9; // 0-based month
time_in.tm_year = y - 1900; // year since 1900
time_t time_temp = mktime (&time_in); // Convert the local time to a calendar value.
tm* time_out = localtime (&time_temp); // Converts a time_t time value to a tm structure
if (time_out->tm_wday > 0) // if it is not Sunday, go to the next Sunday
time_out->tm_mday += 7 - time_out->tm_wday;
strftime(buffer, 80, "%d.%m.%Y", time_out); // date formatting for output
cout << "\nTeachers day is " << buffer << "\n";
}
Объяснение: explanations in the comments to the program
1.
Program u666;
Var
x, y, z, t, n, e, z1, z2, z3: real;
Begin
readln (e, x, y);
if sqrt (3*y)+x = 14
then
begin
z1:= Exp(3*x*y);
z2:= x+3*y;
z3:= 0.5*x;
writeln (z1);
writeln (z2);
writeln (z3)
end
else
z:= 0;
writeln (z);
end.
2. Program Regret;
var x: integer;
begin
read (x);
if (x=1) or (x=3) or (x=5) or (x=7) or (x=8) or (x=10) or (x=12)
then write ('31');
if (x=4) or (x=6) or (x=9) or (x=11)
then write ('30');
if (x=2)
then write ('28')
end.
Объяснение:
Интернет урок)