Ответ:
Var
y,x: integer;
begin
writeln('Ведите ваше число:');
read(x) ;
if x > 2 then
writeln('Результат y =: ', x+3)
Else
if x <=- 2 then
writeln('Результат y =: ', 1 div x);
Readln ;
end.
Уже была такая задача.
Столбиком:
10011
110111
=
1001010
#include <stdio.h>#include <iostream>#include <math.h>
int main() {
system("chcp 1251");float perimetr, ploshad, a, b;printf("Введите стороны прямоугольника (a,b): ");scanf ("%f, %f", &a, &b);perimetr = (a+b)*2;ploshad = a*b;printf("\n Периметр равен: %.2f \n Площадь равна: %.2f \n", perimetr,ploshad);
system ("pause");return 0;}
Решение во вложении
.........................
a=input()
spisok0=a.split()
spisok1=[]
schet=0
for i in range(len(spisok0)):
print(schet)
print(spisok0)
if int(spisok0[schet]) == 0:
spisok1.append(0)
del spisok0[schet]
schet-=1
schet+=1
print(spisok0,spisok1)