<span>1100001001(2) - </span>777(10)
<span>112(8)-74(10)
</span><span>334 A(16)-13130</span>
1.
program list;var x,y,a,b:integer;beginwriteln('Введите размер листа x на y');readln(x,y);writeln('Введите размер изображения a на b');readln(a,b);if (x>a) and (y>b) thenwriteln('Можно разместить')elsewriteln('Нельзя разместить');end.
2.
program opred;var i,n:integer; natch:string; cif: char;beginwrite('Введите натуральное число N: ');readln(natch);write('Введите цифру A: ');readln(cif);n:=length(natch);if natch[n]=cif then write('Верно')elsewriteln('Неверно');end.
3.program opred;var i,n,g,sum,max,kol:integer; chis: array[1..100] of integer;beginwriteln('Вводите числа: ');i:=0;repeat i:=i+1;readln(chis[i]);until(chis[i]=0);n:=i-1;for i:=1 to n do //asum:=sum+chis[i];writeln('a) sum = ',sum);for i:=1 to n do //bbeginif (chis[i]<0) and (chis[i] mod 2 = 0) thenkol:=kol+1;end;writeln('b) kol = ',kol);for i:=1 to n do beginif chis[i]>chis[i+1] thenmax:=chis[i];end;writeln('c) max = ',max);end.
using System;
using System.Linq;
namespace Interesting {
class Program {
static void Main(params int[] a) {
int n = 0;
foreach (int i in a) {
n += (Math.Abs(i - a.Average()) / 100 <= 0.07) ? 1 : 0;
}
Console.WriteLine(n);
}
}
}
Логические данные- это одно из двух значений( истина или ложь).
Var
a, b, c: integer;
Begin
writeln('Введите числа a, b, c');
readln(a, b, c);
if a >= (b + c) then a:= b + c;
writeln(a);
END.