#include <iostream>
using namespace std;
int main()
{
int number, months[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
cout << "Input number of the month: ";
cin >> number;
if ((number >= 1) && (number <= 12)) {
cout << "Number of days is " << months[number - 1];
}
else {
cout << "Input error!";
return 1;
}
return 0;
}
9А₁₆=10011010₂ так как 9₁₆=1001₂ и A₁₆=1010₂
10001011₂ < 10011010₂ => 10001011₂ < 9А₁₆<span>
10111000</span>₂ > 10011010₂ => 10111000₂ > 9А₁₆ <span>
10011011</span>₂ > 10011010₂ => 10011011₂ > 9А₁₆<span>
10110100</span>₂ > 10011010₂ => 10110100₂ > 9А₁₆
Ответ: 3
var a:integer;
begin
writeln('Введите год:');
read(a);
if (a>=2001) and (a<=2100) then begin
writeln('Относится');
end
else
writeln('Не относится');
end.
Ответ:
program Calc;
var
k, x, a, c, y: Double;
begin
Write ('k, x, a, c = ');
ReadLn (k, x, a, c);
if x > 0 then begin
y := k * Sqr (x);
WriteLn ('y = ', y);
end else if a + c <> 0 then begin
y := - x / (a + c);
WriteLn ('y = ', y);
end else
WriteLn ('деление на ноль');
ReadLn;
end.