1)
var
a, b, s : real;
begin
read (a, b);
s := a * b;
write (s:10:4);
end.
2)
var
a, b, c, k : integer;
begin
read (a, b, c);
k := 0;
if a > 0 then inc (k);
if b > 0 then inc (k);
if c > 0 then inc (k);
writeln (k);
end.
3)
var
a : integer;
begin
read (a);
writeln ((a mod 10) * (a mod 100 div 10) * (a div 100 mod 10) * (a div 1000));
end.
4)
var
c, n : integer;
begin
read (n);
c := 0;
repeat
inc (c);
n := n div 10;
until n = 0;
writeln (c);
end.
5)
var
n, sum, i : integer;
begin
read (n);
sum := 0;
for i := 1 to n do
sum := sum + i;
writeln (sum);
end.
6)
var
d, n, k : integer;
begin
read (n, k);
d := 0;
while n >= k do
begin
d := d + 1;
n := n - k;
end;
writeln ('n div k = ', d);
writeln ('n mod k = ', n);
end.
7)
var
n, sum, i, tmp : integer;
begin
read (n);
sum := 0;
for i := 1 to n do
begin
read (tmp);
sum := sum + tmp;
end;
writeln (sum / n);
end.
8)
var
i, n, s : integer;
a : array [1..1000] of integer;
begin
s := 2;
read (n);
for i := 1 to n do
begin
a[i] := s;
s := s + 2 * i + 1;
end;
for i := 1 to n do write (a[i], ' ');
end.
9)
var
n, i, count, tmp : integer;
begin
read (n);
count := 0;
for i := 1 to n do
begin
read (tmp);
if tmp < 0 then inc (count);
end;
writeln (count);
end.
10)
var
n, i, j : integer;
begin
read (n);
for i := 1 to n do
begin
for j := 1 to i do
write ('*');
writeln;
end;
end.
11) //Не понял, как заполняется массив? Тут рандом
var
a : array [1..1000] of integer;
i, n : integer;
begin
read (n);
for i := 1 to n do
a[i] := trunc (random (1000)) - 500;
for i := 1 to n do
if a[i] > 0 then a[i] := a[i] * (-1)
else if a[i] < 0 then a[i] := sqr (a[i]);
for i := 1 to n do
write (a[i], ' ');
end.
12)
var
n, i, count : integer;
begin
read (n);
count := 0;
for i := 1 to n do
if n mod i = 0 then inc (count);
writeln (count);
end.
Поделитесь своими знаниями, ответьте на вопрос:
Соч по информатике 7 класс, 4 четверть.
#рщыщрырыщчрщычрщычр, ыр, щрыщ, рыщ, рщыр, шыр, шыр, шыр, шыр, 8ры7,ры7,ыр7,ыпшы,пш,ыпш,ыпш,ышп,ырш,ршы,рпгкзк1спгзк1гзк1псгщк1сг931ш9рс1у79ср379чргу9в65дфу5щыкз6ык6з6н7ав2гзп3сгзпус1шрзусгизшр3срз3шзр3чзгручрзрчгзуршзчурсш93срш9у1арг931ра39ра93шра3ш9ар9ш3ср9шсрш931ср39шрмш9к1мрг1к993сп9гк1ср1кгрсг91ксрк9г1рм9гк1мп1к9гпм9г1кпм3г9пмг9упм9г3ппм79п3пм793мпгу9у92хра3маоз33зовмоз2мвомз22гвп2г8вм8гвк18гс3н81сузц6кжй3563ц63фы63х6ь4ггь462щ6юд зкплз2зоус11рчш9у1рсш01урс801ур7914рс803ос083ар8831ра91ос831оа83ра835ддывжегйыну6щ 9в58внвнд6удк6